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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16396 |

    Hi,

    I have used the XceedDataGrid and populated the grid with the DataSet. Now to Keep the things simple i just wanted to get the value of a cell in the selected row of the when users click on a particular row…???

    Imported from legacy forums. Posted by Saurabh (had 1559 views)

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.