can we add on_click method on data of gridview?
am using C#, I recieved data from xml file and place it in gridview, is it possible to add on_click method on the rows in the gridview?? ca开发者_StackOverflow社区use i want to make something like quick Access from data retrieved from xml file, kindly need help.
There are a lot of events in gridView, you can see on the properties page. I can suggest you to use CellDoubleClick
event as you want.
In the codebehind, you get indexes like this
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
int columnIndex = e.ColumnIndex;
int rowIndex = e.RowIndex;
}
精彩评论