Home Forums WinForms controls Xceed Grid for WinForms Get the value of a Cell ? Reply To: Get the value of a Cell ?

User (Old forums)
Post count: 23064

to get the cell value when a user click in the cell, you need to subscribe to the cell’s Click event, like:

foreach( Cell cell in this.gridControl1.DataRowTemplate.Cells )
cell.Click -= new EventHandler(cell_Click);

private void cell_Click(object sender, EventArgs e)

//Gets the field name of the cell’s parent column.
if (((Xceed.Grid.DataCell)sender).FieldName == “ClientID”)
string clientID = (string)((Xceed.Grid.DataCell)sender).ParentRow.Cells[“ClientID”].Value;



Imported from legacy forums. Posted by C# (had 542 views)