DevExpress.XtraVerticalGrid.vGridControl 怎么取值啊?vGridControl.DataSource = dt.DefaultView;绑定后可以显示数据。这个方法
Object obj = vGridControl1.GetCellValue(vGridControl1.Rows["name1"], vGridControl1.Rows["name1"].Index);取值取出来的值为 NULL ;但是在提供的demo  里确可以取出来?有知道的请赐教

解决方案 »

  1.   

    试试这样:
    第一个参数用整数下标访问,比如:vGridControl1.Rows[0]
    第二个参数直接用整数,比如:0,1,2之类的
    如果可以的话(至少我这样用的时候是可以的)就需要确认使用的用到整数与vGridControl1.Rows["name1"]和vGridControl1.Rows["name1"].Index是否对应。我很怀疑vGridControl1.Rows["name1"].Index这个用法有问题,你再看看文档上是怎么说的。
      

  2.   

    vGridControl.Rows["name1"].Properties.Value
      

  3.   

    vGridControl1.GetCellDisplayText(vGridControl1.Rows[0], vGridControl1.FocusedRecord)