建议用FLEXGRID试试
得到列号后用SELECT CASE 判断名称
得到列号后用SELECT CASE 判断名称
解决方案 »
- 有没有办法让image 控件显示图片时,渐变显示?
- vb 添加多条数据,第一条数据添加不进去!
- 引用Outlook,在vb的引用对话框中对应的是哪个啊?
- qq的消息规范是怎样的?
- Kao,郁闷,关于ADO的问题.
- 做程序員是否還能繼續下去(困惑﹐困惑﹐困惑﹐)???
- MSFlexGrids控件和mysql的交互问题
- 奇怪啊,我的ODBC怎么由中文变成了英文的?而且以前的Windows认证都不行了?!!急!!在线等!!
- 怎么把FROM窗体打印出来?FROM中有PICTURE
- richtext的小问题
- VB中WebBrowser怎样避免打开新窗口?
- 加急!!!(有关ACCESS2002的BUG问题)
比如,像上面的。我点的是NAME字段,label.caption显示“NAME”
若是我点SEX字段,label.caption显示“SEX”
若是我点ID字段,label.caption显示“ID”
是DATAGRID的属性吗?怎么用啊。请写段代码,给我参考吧。
我点的是NAME字段名,label.caption显示“NAME”,而不是“NAME”下面的数据。
Grid.Row=0
Grid.Col=MouseCol
Label.caption=Grid.Text
Static iCol As Integer
If iCol <> DataGrid1.Col Or LastCol <> DataGrid1.Col Then
Debug.Print DataGrid1.Columns(DataGrid1.Col).DataField
iCol = DataGrid1.Col
End If
End Sub
Private Sub DataGrid1_HeadClick(ByVal ColIndex As Integer)
Dim fld As Field
Dim i As Integer
i = 0
Dim rsTmp As New ADODB.Recordset
Set rsTmp = DataGrid1.DataSource
For Each fld In rsTmp.Fields
If i = ColIndex Then
MsgBox fld.Name '获得字段名
Exit For
End If
i = i + 1
Next
Set rsTmp = Nothing
End Sub