我想一个表中的数据用VSFLEXGRID显示,类似treeview进行分类和合并,要能扩展和缩小,无法完全实现,所以请大家指点。最好给个比较类似例子。谢谢!
[email protected]
[email protected]
解决方案 »
- SQL导入文本文件的方法。
- 这两句代码,在运行的时候为什么总是会提示“下标越界”呢?
- UpdateDriverForPlugAndPlayDevices声明文本
- 一个简单的问题,在LISTBOX中选定一个文件名,想要将相应的文件显示在PICTURE中,谢谢!
- 急!急!在线等!如何将网口模拟成串口?
- 请教读*.ini文件的API函数是什么?怎么用?
- 给100分:有没有像Microsoft Outlook插入图片时的那种对话框,可以预览图片的。
- 在启动一个窗体时,如果初始化一些数据出错,就把这个窗御载应该怎么办?
- wgku(wgku) 进来拿分
- 怎么使recordset集绑定datagrid控件
- 存储过程调用问题(急!!!请各位大侠帮忙,双倍送分!!)
- 都来看一看。
也可以不用NODE对象,直接用GRID组成有可以!可以看一些DEMO!
无法设置NODE对象,请给个例子好吗?
' adodc.recordset.Open bj, ConnectIDD, adOpenKeyset, adLockPessimistic
Adodc.RecordSource = bj
Adodc.Refresh
If Not (Adodc.Recordset.EOF And Adodc.Recordset.BOF) Then
i = Adodc.Recordset.RecordCount
Adodc.Recordset.MoveFirst
With VSFlexQuery
.Rows = 0
.AddItem "部门分类" & vbTab & "部门编号"
' .Cell(flexcpPicture, .Rows - 1) = imgComputer
.IsSubtotal(.Rows - 1) = True
For a = 1 To i
' Debug.Print Adodc.Recordset.Fields(0)
'Debug.Print Adodc.Recordset.Fields(2)
If (STR <> Adodc.Recordset.Fields(0)) And (IsNull(Adodc.Recordset.Fields(0)) = False) Then .AddItem Adodc.Recordset.Fields(0) & vbTab & Adodc.Recordset.Fields(3)
.IsSubtotal(.Rows - 1) = True
.RowOutlineLevel(.Rows - 1) = 1
' VSFlexQuery.GetNode(.Rows - 1).Expanded = False
End If
If (Field2 <> Adodc.Recordset.Fields(1)) And IsNull(Adodc.Recordset.Fields(1)) = False Then
.AddItem Adodc.Recordset.Fields(1) & vbTab & Adodc.Recordset.Fields(3) '& vbTab & Adodc.Recordset.Fields(3)
.Cell(flexcpBackColor, .Rows - 1, 1) = &HF0F0F0 .IsSubtotal(.Rows - 1) = True
.RowOutlineLevel(.Rows - 1) = 2
End If
If Adodc.Recordset.Fields(2) <> "" Then
.AddItem Adodc.Recordset.Fields(2) & vbTab & Adodc.Recordset.Fields(3)
.IsSubtotal(.Rows - 1) = True
.RowOutlineLevel(.Rows - 1) = 3
End If
' VSFlexQuery.GetNode(.Rows - 1).Expanded = False
If IsNull(Adodc.Recordset.Fields(1)) = False Then
Field2 = (Adodc.Recordset.Fields(1))
End If
STR = Adodc.Recordset.Fields(0)
Adodc.Recordset.MoveNext
Next a
' VSFlexQuery.GetNode(.Rows - 1).Expanded = False
End With
End If
'VSFlexQuery.GetNode(0).Expanded = False
VSFlexQuery.GetNode(1).Expanded = False