to get the selected column index in a datagrid in a web app
-
I am working on a web application in visual studio 2008 and have come accross a problem where in i am not able to get the column index of the selected cell. the properties like CurrentCell or SelectedCell are not present.kindly assist me in this regard.
-
I am working on a web application in visual studio 2008 and have come accross a problem where in i am not able to get the column index of the selected cell. the properties like CurrentCell or SelectedCell are not present.kindly assist me in this regard.
Try this:
private void UsersDataGrid_SelectedIndexChanged(object sender, System.EventArgs e)
{
LabelInfo.Text = UsersDataGrid.SelectedItem.Cells[1].Text;
}Refer the links below: MSDN : DataGrid.SelectedIndex Property [^]
Read the article "Table Valued Parameters". --Amit
-
I am working on a web application in visual studio 2008 and have come accross a problem where in i am not able to get the column index of the selected cell. the properties like CurrentCell or SelectedCell are not present.kindly assist me in this regard.
hffadsjgjf
-
I am working on a web application in visual studio 2008 and have come accross a problem where in i am not able to get the column index of the selected cell. the properties like CurrentCell or SelectedCell are not present.kindly assist me in this regard.
Workout on SelectedIndexChanged Event of Gridview, and pick up the SelectedIndex in that Event. - Happy Coding - Vishal Vashishta