Home Forums WinForms controls Xceed Grid for WinForms How to get the the paricular cell value of a selected row?? Reply To: How to get the the paricular cell value of a selected row??

User (Old forums)
Member
Post count: 23064

Are you inquiring about the .NET Grid or the WPF DataGrid?  I ask because you have added “xbap” to your tags, which is relevant to the WPF grid.

If you’re in .NET, use the CurrentCellChanged event, and get the value of the CurrentCell in the event handler.

e.g.:

private void Form1_Load( object sender, EventArgs e )

{

    gridControl1.CurrentCellChanged +=

new EventHandler( gridControl1_CurrentCellChanged );

}

void gridControl1_CurrentCellChanged( object sender, EventArgs e )

{

    Debug.WriteLine( gridControl1.CurrentCell.Value.ToString() );

}

If you’re in WPF, please repost your question on the WPF forums.

Imported from legacy forums. Posted by André (had 1069 views)