S
scott.loomis
I am not sure if this is the best place to post this.
I have an ASP.NET Datagrid control that I am using. I have been trying
to figure out if it is possible to select a row client side on page
load, i know about the datagrid selectedindex, but that does not
provide me with the functionality I am looking for. I have a
javascript function that catches a click event of the row
function onRowClick(row)
{
//Do something
}
Now that works fine if a user clicks on the datagrid, because my rows
reference the function <tr align="Center" onclick="onRowClick(this)">
I am looking for is a way to simulate a click on the first row on
page load via javascript.
My grid is named dgrList, here is the grid
<asp:datagrid id="dgrList" runat="server" Width="448px"
BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
BackColor="White" CellPadding="3" GridLines="Horizontal"
autogeneratecolumns="False">
Now when I try to run something like
onRowClick(document.frmRemoteScan.dgrList.rows(0));
I get the message that dgrList is null or not an object, and when I
loop throught the elements in my form, dgrList is not one of them(yes
it is between the form tags).
My question, is there a way to reference the created table via
javascipt? Or does anyone have a way to simulate the row clcik via
javascript
I have an ASP.NET Datagrid control that I am using. I have been trying
to figure out if it is possible to select a row client side on page
load, i know about the datagrid selectedindex, but that does not
provide me with the functionality I am looking for. I have a
javascript function that catches a click event of the row
function onRowClick(row)
{
//Do something
}
Now that works fine if a user clicks on the datagrid, because my rows
reference the function <tr align="Center" onclick="onRowClick(this)">
I am looking for is a way to simulate a click on the first row on
page load via javascript.
My grid is named dgrList, here is the grid
<asp:datagrid id="dgrList" runat="server" Width="448px"
BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
BackColor="White" CellPadding="3" GridLines="Horizontal"
autogeneratecolumns="False">
Now when I try to run something like
onRowClick(document.frmRemoteScan.dgrList.rows(0));
I get the message that dgrList is null or not an object, and when I
loop throught the elements in my form, dgrList is not one of them(yes
it is between the form tags).
My question, is there a way to reference the created table via
javascipt? Or does anyone have a way to simulate the row clcik via
javascript