Jump to content

clicking on a particular row in grid


Recommended Posts

I am trying to automate asp.net pages and have a grid with the HTML posted below. I don't seem to be able to get a handle on this control and click on the row of the grid I would like to. I have tried using $oGrd = _IEFormElementGetObjByName ($oForm, "ctl00_Main_grdCust") but I get the no status error. Has anyone any idea what is causing this or could point me in the right direction? Could it be because it is a dynamic control that creates as many rows as is necessary? Thanks for any help.

<TABLE id=ctl00_Main_grdCust style="BORDER-LEFT-COLOR: #373abe; BORDER-BOTTOM-COLOR: #373abe; WIDTH: 100%; BORDER-TOP-COLOR: #373abe; BORDER-COLLAPSE: collapse; BORDER-RIGHT-COLOR: #373abe" cellSpacing=0 cellPadding=2 rules=all border=1>

<TBODY>

<TR class=gridHeader>

<TD>Name</TD>

<TD>Address Line 1</TD>

<TD>Date Of Birth</TD>

<TD>Customer Number</TD></TR>

<TR class=gridItem onmouseover="sdgRollover(this, true);" onmouseout="sdgRollover(this, false);">

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl02','edit')">PAUL COSTELLO</TD>

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl02','edit')">52 blah blah RD</TD>

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl02','edit')">&nbsp;</TD>

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl02','edit')">000COP3.000</TD></TR>

<TR class=gridItemAlt onmouseover="sdgRollover(this, true);" onmouseout="sdgRollover(this, false);">

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl03','edit')">PAUL COSTELLO</TD>

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl03','edit')">CROBALLY</TD>

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl03','edit')">&nbsp;</TD>

<TD onclick="if (Disabled('ctl00_Main_grdCust')) return false;__doPostBack('ctl00$Main$grdCust$ctl03','edit')">000COP3.001</TD></TR>

<TR class=gridItem onmouseover="sdgRollover(this, true);" onmouseout="sdgRollover(this, false);">

Link to comment
Share on other sites

Quick update on this - I must have been wrong to think of the grid as an object. It appears that if I use the table method as follows...

$oGrd = _IETableGetCollection ($oForm, "ctl00_Main_grdCust")

then I can then get all the data from the table. How can I then click a particular row of this table?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...