我有一个显示3列的DataGridView,但我想在链接文本中转换其中一列的值。
我将DataGridView填充如下:
DataGridViewSearchReport.DataSource = queryResDT
queryResDT是来自SQL查询的DataTable
答案 0 :(得分:0)
Private Sub DataGridViewSearchReport_DataBindingComplete(sender As Object, e As DataGridViewBindingCompleteEventArgs) Handles DataGridViewSearchReport.DataBindingComplete
For Each row As DataGridViewRow In DataGridViewSearchReport.Rows
If Not IsNothing(row.Cells("Report Name")) Then
row.Cells("Report Name") = New DataGridViewLinkCell
End If
Next
End Sub