Gridviewcontrol ControlsGet the value of a column in the current row in the event handler:
String Buyplanid = Gridview1.getrowcellvalue (Gridview1.focusedrowhandle, "Buyplanid"). ToString ();
int buystate = Convert.ToInt32 (Gridview1.getrowcellvalue (Gridview1.focusedrowhandle, "buystate"));
The DoubleClick property of the control
private void Gridcontrol1_doubleclick (object sender, EventArgs e) {if (Gridview1.focusedrowhandle < 0)//Determine if there is a selected line {return; } String Inandoutmainid = Gridview1.getdatarow (Gridview1.focusedrowhandle) ["Inandoutmainid"]. ToString (); Production Invoice Details LCFHD = new production Order Details (Inandoutmainid); LCFHD. ShowDialog (); }
Plus double-click on a row of events:
Double-click the Cellcontentdoubleclick property
DataGridView Control get the value of a column in the current row in the event handler:
int Currentrowindex = datagridview1.currentrow.index;string Workitemname = Datagridview1.rows[currentrowindex]. cells["CodeBak1"]. Value.tostring ();d Atagridview2.datasource = Dyh. Workiteminfodetail (Workitemname);
Gridviewcontrol Control and DataGridView Control get the currently selected row