在数据库的表中,第一列为系统编号,它的格式如下:
1
1.1
1.2
1.2.1
1.2.2
1.3
2
2.1
2.1.1
2.1.1.1
....
我怎样设置VsFlexGrid才能在树型列表显示上述结构的图形表示?(就是初始只有两行1和2,然后点击1以后则1再显示有1.1,1.2,1.3....

解决方案 »

  1.   

    我边vsflexgrid的树型结构都做不出来,能给个源程看看吗
      

  2.   

    可以,留下你的Mail,Vsflexgrid附带的例子不是有树型的吗
      

  3.   

    我有看过它的例子,可是看得不是很懂,我想看一看完整的例子!
    另外,我想知道它的book属性,怎么用,
    我有一行语句 vsflex.book(变量)=rejxc.book
    可是它提示我 要求对象 错误,你能告诉我是什么回事吗?
    谢谢!!!
    我的email:[email protected]
      

  4.   

    已发送到你邮箱,对vsflexgrid我现在可以说是一窍不通,且我的职业跟用它没有关系,所以没有花时间去研究它,我现在把它的Demo和Help mail给你,你研究研究
      

  5.   

    Dim cn as New ADODB.Recordset
    Dim rs As New ADODB.Recordset
    Dim lngY As Long
    Dim intT As Integercn.open "............"
    rs.Open "select 系统编号 from test", cn
    With VSFlexGrid1
        Set .DataSource = rs
            .RowOutlineLevel(1) = 1
            .IsSubtotal(1) = True
        
        For lngY = 1 To .Rows - 1
            intT = Len(.TextMatrix(lngY, 0)) - Len(Replace(.TextMatrix(lngY, 0), ".", ""))
            .RowOutlineLevel(lngY) = intT
            .IsSubtotal(lngY) = True
        Next
        .OutlineCol = 0
        .OutlineBar = flexOutlineBarSimpleLeaf
        
    End With
      

  6.   

    Dim cn as New ADODB.Recordset
    Dim rs As New ADODB.Recordset
    Dim lngY As Long
    Dim intT As Integercn.open "............"
    rs.Open "select 系统编号 from test order by 系统编号", cn
    With VSFlexGrid1
        Set .DataSource = rs
            .RowOutlineLevel(1) = 1
            .IsSubtotal(1) = True
        
        For lngY = 1 To .Rows - 1
            intT = Len(.TextMatrix(lngY, 0)) - Len(Replace(.TextMatrix(lngY, 0), ".", ""))
            .RowOutlineLevel(lngY) = intT
            .IsSubtotal(lngY) = True
        Next
        .OutlineCol = 0
        .OutlineBar = flexOutlineBarSimpleLeaf
        
    End With