开发者

can we add on_click method on data of gridview?

开发者 https://www.devze.com 2023-01-27 05:05 出处:网络
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 qui

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

精彩评论

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