C # WinForm Get DataGrid Cell data through the mouse point DataGrid event

xiaoxiao2021-03-06  22

Have a long time not .NET's WinForm program, .NET is used to use the DataGrid control in WinForm, always feel

And VC , the DataGrid naming difference between VB6 is too big! And it is a bit weird!

One of the features I want to implement is that when the user's mouse point DataGrid is time, the system selects the data defaults.

You can then delete it. The program code is as follows:

private void dataGridScore_DoubleClick (object sender, System.EventArgs e) {pUserID = dataGridScore [dataGridScore.CurrentCell.RowNumber, 0] .ToString (); labSelectUser.Text = "current selection [" pUserID "] integral recording";}

Getting Cell information is to get information with DataGrid [Row, Cell] syntax! It's really not used to it again!

转载请注明原文地址:https://www.9cbs.com/read-40145.html

New Post(0)