开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜