method Group.EndUpdate ()

Resumes painting the group after painting is suspended by the BeginUpdate method.


The BeginUpdate and EndUpdate methods increases the speed of loading your items, by preventing painting the group when it suffers any change. Once that BeginUpdate method was called, you have to make sure that EndUpdate method will be called too. The following sample shows how to use the BeginUpdate and EndUpdate methods:

With ExplorerTree1.Groups.Add("Group 1")
    Set rs = CreateObject("ADODB.Recordset")
    rs.Open "Orders", "Provider=Microsoft.Jet.OLEDB.3.51;Data Source= D:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB", 3 ' Opens the table using static mode
    .ColumnAutoResize = False
    .HeaderVisible = True
    ' By default, the group adds a default colum, so we remove it first
    For Each f In rs.Fields
        .Columns.Add f.Name
    .PutItems rs.GetRows()
End With

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.