A
ABHIJIT B
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)
{
dgServiceDatabaseList.DataSource =
dsDatabaseList.Tables[0];
dgServiceDatabaseList.DataBind();
//dgServiceDatabaseList.SelectedIndex =
0;
dgServiceDatabaseList.Items[0].Cells[0].Focus();
dgServiceDatabaseList.Cur =
dcDatabaseListSucess = 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,
dgServiceDatabaseList.SelectedIndex = 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)
{
dgServiceDatabaseList.DataSource =
dsDatabaseList.Tables[0];
dgServiceDatabaseList.DataBind();
//dgServiceDatabaseList.SelectedIndex =
0;
dgServiceDatabaseList.Items[0].Cells[0].Focus();
dgServiceDatabaseList.Cur =
dcDatabaseListSucess = 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,
dgServiceDatabaseList.SelectedIndex = 0; but this highlights the row
but iw ant to set focus.
I am unaware of SetFocus() method.
Best Regards,
Abhijit B