Hi,
We are using ASP.net 2.0 with C# for developing web application.
I am using datagrid in one of form and binding data to it as given
below,
if (dsDatabaseList .Tables[0].Rows.Count 0)
{
dgServiceDataba seList.DataSour ce =
dsDatabaseList. Tables[0];
dgServiceDataba seList.DataBind ();
//dgServiceDataba seList.Selected Index =
0;
dgServiceDataba seList.Items[0].Cells[0].Focus();
dgServiceDataba seList.Cur =
dcDatabaseListS ucess = true;
}
dsDatabaseList. Tables[0] contains more than 100 records.
I want to set focus on first row and first column in datagrid.
I tried using foloowing,
dgServiceDataba seList.Selected Index = 0; but this highlights the row
but iw ant to set focus.
I am unaware of SetFocus() method.
Best Regards,
Abhijit B
We are using ASP.net 2.0 with C# for developing web application.
I am using datagrid in one of form and binding data to it as given
below,
if (dsDatabaseList .Tables[0].Rows.Count 0)
{
dgServiceDataba seList.DataSour ce =
dsDatabaseList. Tables[0];
dgServiceDataba seList.DataBind ();
//dgServiceDataba seList.Selected Index =
0;
dgServiceDataba seList.Items[0].Cells[0].Focus();
dgServiceDataba seList.Cur =
dcDatabaseListS ucess = true;
}
dsDatabaseList. Tables[0] contains more than 100 records.
I want to set focus on first row and first column in datagrid.
I tried using foloowing,
dgServiceDataba seList.Selected Index = 0; but this highlights the row
but iw ant to set focus.
I am unaware of SetFocus() method.
Best Regards,
Abhijit B