Selecting row under Grid for EXTJS code

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

···

--
Posted via http://www.ruby-forum.com/.

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 Sharma < bhavesh1_sharma@rediffmail.com>

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
--
Posted via http://www.ruby-forum.com/\.

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 --

<TBODY>
<TR>
<TD style="WIDTH: 274px" class="x-grid3-col x-grid3-cell
x-grid3-td-reviewername x-grid3-cell-first " tabIndex=0>
<DIV class="x-grid3-cell-inner x-grid3-col-reviewername"
unselectable="on">kazeon1</DIV></TD></TR></TBODY></TABLE></DIV>

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 Sharma <
bhavesh1_sharma@rediffmail.com>

--
Posted via http://www.ruby-forum.com/\.