How to get the selected row values of DevExpress XtraGrid?

前端 未结 7 788
后悔当初
后悔当初 2020-12-03 07:48

Consider the following picture

\"enter

I get the selected row values in the th

7条回答
  •  囚心锁ツ
    2020-12-03 08:16

    I found the solution as follows:

    private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
    {
        TBGRNo.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GRNo").ToString();
        TBSName.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SName").ToString();
        TBFName.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "FName").ToString();            
    }
    

    enter image description here

提交回复
热议问题