performance increase of flexgrid
Hi all,
Please tell me how to increase performance of flexgrid, in filling data through recordset
i have used additem() property of flexgrid to fill data but i think is takes too much time in comparision of set_textgrid() property.
this is my code:
RS = GCnAdodb.Execute("select Code,Name from groupmast order by name")
I = 0
RS.MoveFirst()
Do Until RS.EOF
I = I + 1
FlexGrid1.AddItem("" & Chr(9) & RS.Fields("Code").Value & Chr(9) & RS.Fields("Name").Value)
rs1 = GCnAdodb.Execute("select * from UserGroup where userid='" & TextBox1.Tag & "' and GroupCode='" & RS.Fields("Code").Value & "'")
If rs1.RecordCount > 0 Then
FlexGrid1.Row = I
FlexGrid1.Col = 3
FlexGrid1.CellFontName = "wingdings"
FlexGrid1.CellFontSize = 18
FlexGrid1.CellForeColor = Color.Blue
FlexGrid1.set_TextMatrix(I, 3, "ü")
End If
RS.MoveNext()
Loop
this is correctly running but takes much time, i want to increase performance of it.
so, i want to replace .additem() with set_matrix() but it gives error.
so please tell me how to correct it.
your help is appriciated.
thanks.