【问题标题】:Get the value of a specific row and specific column from datagrid从数据网格中获取特定行和特定列的值
【发布时间】:2017-08-30 15:35:03
【问题描述】:

这是在 GridView 中完成这项工作但在 DataGrid 中不起作用的代码

Dim x as string = GridView1.rows(e.rowindex).cells(2).text  (Working)    
Dim x as string = DataGrid1.rows(e.rowindex).cells(2).text  (Not Working)

我需要使用 DataGrid。

【问题讨论】:

    标签: asp.net vb.net sql-server-2012


    【解决方案1】:

    试试这个,看看它是否适合你。

      Dim x = DataGrid1.Rows(e.rowindex).Cells(2).Value.ToString()
    

    【讨论】:

    • 我试过了,但没有用 但是我得到了一些其他的东西 "Dim x as string = e.item.cells(2).text"
    猜你喜欢
    • 2016-01-02
    • 1970-01-01
    • 2019-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-17
    • 1970-01-01
    • 2018-12-25
    相关资源
    最近更新 更多