2017-10-04 3 views
0

私はWFに7列10行のc1FlexGridを持っています。ダブルクリックすると、その行の詳細なような別のWFを開きたいのですが、そのフォームにuserIdの値を送信したいと思います。私はそのidを得る方法を知らない。私のコードは次のようになります:c1FlexGridから特定の値を取得するには?

private void c1FlexGrid1_DoubleClick(object sender, System.EventArgs e) 
{ 
    int rowIndex = c1FlexGrid1.Row; 
    if (rowIndex != -1) 
    {   
    int userId = I need value from column "UserId" on this rowIndex. 
    frmUser userForm = new frmUser(userId); 
    userForm.ShowDialog(); 
    }  
} 

何か提案がありますか?

答えて

1

試行この(object GetData(int rowIndex, string columnName)):RowSelは、選択された行のインデックスである

int userId = (int)c1FlexGrid1.GetData(c1FlexGrid1.RowSel, "UserId"); 

関連する問題