怎样修改datagrid中每列的标题
求助: 数据库中的每个列名只是一个标题符号,当在datagrid中显示信息时怎样能把标题修改成汉语意思来显示?[此贴子已经被作者于2006-6-13 10:23:13编辑过]
Dim Tstyle As New DataGridTableStyle
Dim DCstyle As DataGridColumnStyle
Dim inti As Integer
For inti = 0 To strMappingName.Length - 1
DCstyle = New DataGridTextBoxColumn
With DCstyle
.Alignment = HorizontalAlignment.Center
.MappingName = strMappingName(inti)
.HeaderText = strHeaderText(inti)
.Width = intWidth(inti)
End With
Tstyle.GridColumnStyles.Add(DCstyle)
DCstyle.Dispose()
Next
Tstyle.MappingName = strTableName '设置映射表名
gridview.TableStyles.Add(Tstyle)
DCstyle.Dispose()
Tstyle.Dispose()