如果直接用甜老师这个代码的使用效果是:在同一行中,改动任何一列的数据,行高就会根据该列的行高自动调整。如果改为:
If e.Col.Name="列名" Then
Dim t As Table = e.Table
Dim cname As String = e.Col.name
Dim lc As Integer = t.cols(cname).index+1
Dim br As Integer = e.Row.index+t.HeaderRows
t.grid.AutoSizeRows(0, lc, br, lc, 0, 0)
End If
则改动该列的数据,该行会自动调整行高,改动其他列行高无变化。
实在是好用。