【问题标题】:retrieving specific value from a listview从列表视图中检索特定值
【发布时间】:2014-05-25 02:33:36
【问题描述】:

我的列表视图控制器的每一行都有一个选择按钮。 I am trying to create code behind in c# that will be able to get the ID of the specific column when a select button for that row is selected.如何获取该特定行的 ID 值?

【问题讨论】:

    标签: c# database listview code-behind


    【解决方案1】:

    您可以使用 tag 属性来绑定每一行中的 id,并在您的代码中为事件处理程序访问该标签。这会给你 id

    Tag="{Binding id}"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-12
      • 2019-02-08
      • 2016-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多