Home Forums WinForms controls Xceed Grid for WinForms how to get row of corresponding dataset table? Reply To: how to get row of corresponding dataset table?

User (Old forums)
Member
Post count: 23064

Figured it out.

    void cell_DoubleClick(object sender, EventArgs e)
    {
        Xceed.Grid.Cell cell = sender as Xceed.Grid.Cell;

        string columnName = cell.FieldName;
        int rowIndex = ((Xceed.Grid.DataRow)gridControl1.CurrentRow).Index;

        string val = ((DataSet)gridControl1.DataSource).Tables[“Products”].Rows[((Xceed.Grid.DataRow)gridControl1.CurrentRow).Index][columnName];
    }

 

Imported from legacy forums. Posted by Buzz (had 1162 views)