# Selecting row under Grid for EXTJS code

**URL:** <https://www.ruby-forum.com/t/selecting-row-under-grid-for-extjs-code/167068>\
**Category:** Ruby\
**Created:** [May 3, 2009, 7:47am UTC](https://www.ruby-forum.com/t/selecting-row-under-grid-for-extjs-code/167068 "2009-05-03T07:47:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [May 3, 2009, 7:47am UTC](https://www.ruby-forum.com/t/selecting-row-under-grid-for-extjs-code/167068/1 "2009-05-03T07:47:56Z")

</div>

Hi,

I have to select the row under Grid which is an extjs code.

When we have a grid, and want to select a “row” in the grid, for some  
reason we cannot select it. We have sent click events and it appears  
that we’re getting the “right row” (watir highlights the row in the  
browser), but our app code doesnt get the event from ext-js.

Can some one help me how can i click/select this row, so that i can go  
ahead.

Any help is appriciated.

Bhavesh

---

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [May 3, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/selecting-row-under-grid-for-extjs-code/167068/2 "2009-05-03T16:31:28Z")

</div>

GridPanel has a _getSelectionModel_() method.Yan can get a instance of  
Ext.grid.RowSelectionModel.In this class you can add a listener and fire  
the  
event of _rowdeselect._ 2009/5/3 Bhavesh S. \<  
removed\_email\_address@domain.invalid\>

---

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [May 4, 2009, 5:33am UTC](https://www.ruby-forum.com/t/selecting-row-under-grid-for-extjs-code/167068/3 "2009-05-04T05:33:59Z")

</div>

Hi,

Thanks for the reply.

But i have to write code in WATIR.

I am automating testcase, where i have to select the row.

This is what im getting when i see source –

kazeon1

And this is the code which im trying to write, to select row under  
GRID.

$\_ = $ie.html  
#$id = $ie.html.scan(/\<DIV  
class="(._)".unselectable.\>#{reviewernames}/i).flatten  
if /\<TD style=.class="(.)"._\n\<DIV  
class=".\*"._unselectable._#{reviewernames}\</  
printIDInfo(“CaseID”, $1)

begin  
$ie.cell(:class, $1).click  
rescue =\> e  
rescueHandle(e)  
return false  
end  
sleep($lightSleep)  
else  
puts “Not able to click cell ID”  
end

Can you elaborate more.

Thanks

çŽ‹æ–° wrote:

> GridPanel has a _getSelectionModel_() method.Yan can get a instance of  
> Ext.grid.RowSelectionModel.In this class you can add a listener and fire  
> the  
> event of _rowdeselect._ 2009/5/3 Bhavesh S. \<  
> removed\_email\_address@domain.invalid\>
