Using ListView's VirtualMode

  • Thread starter Thread starter gene kelley
  • Start date Start date
G

gene kelley

I had a VB6 app that used a third party ListView control to simply display various recordsets. The
control had a VirtualMode which I used for this display.

Now in VB2005, I want to do the same with the native ListView to display various datasets in
VirtualMode. I have a ListView with the VirtualListSize set and the appropriate columns in place
which is all similar to the old VB6 app. However, the similarities end there as I can't find any
example in Help, Google or MSDN on how to populate a VirtualMode ListView in VB2005. How is this
accomplished?


Thanks,

Gene
 
gene kelley said:
Now in VB2005, I want to do the same with the native ListView to display
various datasets in
VirtualMode. I have a ListView with the VirtualListSize set and the
appropriate columns in place
which is all similar to the old VB6 app. However, the similarities end
there as I can't find any
example in Help, Google or MSDN on how to populate a VirtualMode ListView
in VB2005.

Check out the control's 'RetrieveVirtualItem' event.
 
Genne,

VirtualMode is a nice word that can have a lot of contents. I checked it by
instance on Wikepedia and on that it does not exist. It is used as this in
the DataGridView, in the way my message is that exactly oposite as you want
to do.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview.virtualmode.aspx

I would not use a listview with VBNet, the listview is for non database
related data. Have a look at the DataGridView for that, if you use normally
only the detailview of the listview (as most do), than you can tailor the
DataGridView real very good in that direction.

Otherwise describe what your goal is with the by your supplier named
VirtualMode.

I hope this helps,

Cor
 
Genne,

VirtualMode is a nice word that can have a lot of contents. I checked it by
instance on Wikepedia and on that it does not exist. It is used as this in
the DataGridView, in the way my message is that exactly oposite as you want
to do.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview.virtualmode.aspx

I would not use a listview with VBNet, the listview is for non database
related data. Have a look at the DataGridView for that, if you use normally
only the detailview of the listview (as most do), than you can tailor the
DataGridView real very good in that direction.

Otherwise describe what your goal is with the by your supplier named
VirtualMode.

I hope this helps,

Cor

The original VB6 app was a cataloging program which was "skinned" and used a 3rd party ListView with
Virtual Mode, and was skinable to match the rest of the UI. It worked fine. Largest number of
records I'm aware of from one of the user's is about 50,000.

Now it's time to rewrite this app in NET.
I have a new 3rd party skin component that supports the ListView.
I got the ListView VirtualMode working (re: my original post), but the resulting records display has
unacceptable redrawing/flickering when resizing the column widths.

I took a brief look at the DataGridView. The skin component supports the scroll bars on the
DataGridView and I see how the rest of the control can be customized to generally matcht the app's
skin. More impoortantly, there seems to be no redraw/flicker issues.

Now, with looking at using a DataGridView type control instead of a ListView, I am thinking of using
a master/detail display. I have a 3rd party DataGrid demo which shows an example of a master/detail
display in one grid. That is, the Master Data is displayed with a "expand" icon. Clicking the
"expand" icon expands the row to show the Detail Data. I took a quick look at some Master/Detail
examples using the DataGridView, but the examples I found all use 2 DataGridView controls side by
side or top and bottom. Do you know if it's possible to create a Master/Detail display using only
one DataGridView control?

Gene
 
Back
Top