Home All Groups Group Topic Archive Search About

Using ListView's VirtualMode

Author
26 Jul 2006 8:47 PM
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

Author
26 Jul 2006 9:15 PM
Herfried K. Wagner [MVP]
"gene kelley" <o***@by.me> schrieb:
> 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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
27 Jul 2006 4:28 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"gene kelley" <o***@by.me> schreef in bericht
news:4ajfc2hsejq55gjer9ge8ug4htcabeudgr@4ax.com...
>
> 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
Author
27 Jul 2006 5:10 AM
Cor Ligthert [MVP]
"my message" should be "in my idea your message tells"

Cor

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht
news:Od8CCUTsGHA.372@TK2MSFTNGP06.phx.gbl...
> 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
>
> "gene kelley" <o***@by.me> schreef in bericht
> news:4ajfc2hsejq55gjer9ge8ug4htcabeudgr@4ax.com...
>>
>> 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
>
>
Author
27 Jul 2006 11:47 AM
gene kelley
Show quote Hide quote
On Thu, 27 Jul 2006 06:28:54 +0200, "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote:


>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