引用“本地”窗口中的控件

时间:2017-03-13 15:34:56

标签: c# visual-studio-2015 code-behind

我的Locals窗口中显示了一个GridView。我走的路是:

This -->   
  DataGrid_AA -->
    Controls -->
      Results View -->
        [0] -->
          Controls -->
            Results View -->
              [0] -->    
                Cells -->
                  Results View -->
                    [2] --> X

我如何在代码中引用“X”?我试过了:

string x = this.DataGrid_AA.Controls[0].Controls[0].Cells[2].Text;

但它告诉我“Control不包含Cells的定义”。有什么想法吗?

0 个答案:

没有答案