Hi..buddy,
Thanks a lot for ur willingness to help out. And give me an extra edge with a control that i have never used: the ListView, even though I have marked this post as RESOLVED.
I will surely refer to ur advice in future, when i need to display records in a manner such as in a grid.
QUESTION:
=======
I did not understand 2 code lines. Could u pls explain their syntax/pattern for parametres from ur code snippet ??
************************************************************
lvList.ListItems.Add lvList.ListItems.Count + 1, , "Data: " & CStr(irows)
************************************************************
***********************************************************
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add 1, , "Sub data 1: " & CStr(irows)
***********************************************************
And why do u recommend the ListView , instead of the FLEX GRID ?
Becoz, as per after going thru ur code, i am seeing that the ListView cannot draw the vertical & horizontal lines like a grid control. Hence this can lead to visual ambiguity for the reader, when the list is heavily populated with database records.
And i feel that the code for the grid that i have stated is much more simple requiring lesser variety of properties, arguments & methods.
Infact one does not need to know any syntax to code the Grid control, just a logical visual sequence of steps. But in ur List View, i am having problems to understand the code, becoz i have to learn the new format of the properties & argument patterns used.
Please provide a more solid and really simple point to make someone shift from coding the grid to using the ListView in future....
I am not being rude. But lets make it really worthwile to move to another probably better control (fingers crossed)
Awaiting ur techies suggestions....
I recommend using something other than the flexgrid. I use the listview all the time. Setup the listview like below and add items.
With lvList
.View = lvwReport
.FullRowSelect = True
.HideColumnHeaders = False
.HideSelection = False
.ColumnHeaders.Add 1, , "Col 1"
.ColumnHeaders.Add 2, , "Col 2"
.ColumnHeaders.Add 3, , "Col 3"
End With
Dim irows As Integer
For irows = 0 To 10
lvList.ListItems.Add lvList.ListItems.Count + 1, , "Data: " & CStr(irows)
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add 1, , "Sub data 1: " & CStr(irows)
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add 2, , "Sub data 2: " & CStr(irows)
Next