【问题标题】:Add/Edit Columns in DataBound DataGridView在 DataBound DataGridView 中添加/编辑列
【发布时间】:2010-04-26 18:02:31
【问题描述】:

我有一个从数据库表中绑定数据的 datagridview。我该怎么做:

a) 使用行中其他列的值编辑列的显示值? (例如,显示如下 URL:

    <a href="/url?param=columnA">columnB</a>

其中columnA是A列的值,columnB是B列的值)

b) 使用其他列中的值添加一个附加列(类似于 a。)

【问题讨论】:

    标签: c# winforms datagridview


    【解决方案1】:
    【解决方案2】:

    您没有提及您已经尝试过的内容,但是对于 a) 您可以尝试 DataGridView.CellFormatting 事件,对于 b) How to: Add an Unbound Column to a Data-Bound Windows Forms DataGridView Control

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-19
      • 1970-01-01
      相关资源
      最近更新 更多