Hi Kevin,
Here is an example for Virtual List View.
http://www.windowsforms.net/ControlG...Control=214&ta
bindex=9
You may try it to see if it meets your need, thanks!
Kind regards,
Ying-Shen Yu [MS]
Microsoft Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
| X-Tomcat-ID: 383996803
| References: <(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From:
v-(E-Mail Removed) (Ying-Shen Yu[MS])
| Organization: Microsoft
| Date: Fri, 05 Sep 2003 15:05:52 GMT
| Subject: RE: Bugs with virtual list-view
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| Message-ID: <(E-Mail Removed)>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Lines: 96
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51745
| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| Hi Kevin,
| Why not try implementing the DataBinding on ListView, Here is an
| article, I hope it will help you somehow.
|
http://msdn.microsoft.com/library/en...62002.asp?fram
| e=true
| And about you problem, have you setup the right style when creating the
| control?,
| you may search LVS OWNERDATA in MSDN for detailed information.
| and here is also a discussion thread on your approach
|
http://groups.google.com/groups?hl=e...readm=0dhn9.64
|
92%24s5.193245%40twister.southeast.rr.com&rnum=1&prev=/groups%3Fq%3D%2522Lio
|
n%2BShi%2522%2BVirtual%2BListView%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-
| 8%26selm%3D0dhn9.6492%2524s
|
| Is the information above helpful to your problem?
| If you still have problems on this issue, please let me know,
| Thanks!
|
|
| Kind regards,
|
| Ying-Shen Yu [MS]
| Microsoft Support Engineer
|
| This posting is provided "AS IS" with no warranties, and confers no
rights.
| You assume all risk for your use. 2001 Microsoft Corporation. All rights
| reserved.
| --------------------
| | From: "Kevin Westhead" <(E-Mail Removed)2DOTcoDOTuk>
| | Subject: Bugs with virtual list-view
| | Date: Thu, 4 Sep 2003 16:10:14 +0100
| | Lines: 57
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| | Message-ID: <(E-Mail Removed)>
| | Newsgroups: microsoft.public.dotnet.framework.windowsforms
| | NNTP-Posting-Host: host5.i2.co.uk 193.129.24.5
| | Path:
|
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA0
| 5.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.windowsforms:51636
| | X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| |
| | I'm working on a virtual list-view control derived from
| | System.Windows.Forms.ListView, however I've been running into problems
| | because the base control thinks it owns the items in the list. For
| example,
| | I get the following exception whenever the control receives focus:
| |
| | Specified argument was out of the range of valid values.
| | Parameter name: '5' is not a valid value for 'displayIndex'.
| | at System.Windows.Forms.ListViewItemCollection.get_Item(Int32
| | displayIndex)
| | at System.Windows.Forms.ListView.get_FocusedItem()
| | at System.Windows.Forms.ListView.WndProc(Message& m)
| | at VListView.WndProc(Message& m) in ..\listview.cs:line 355
| |
| | The code for the base control, in response to WM_SETFOCUS, is something
| like
| | this:
| |
| | base.WndProc(m);
| |
| | if ((this.FocusedItem != null) || (this.Items.Count <= 0))
| | return;
| |
| | this.Items[0].Focused = true;
| | return;
| |
| | The FocusedItem property is as follows:
| |
| | int num1;
| |
| | if (base.IsHandleCreated)
| | {
| | num1 = base.SendMessage(4108, -1, 1); // LVM_GETNEXTITEM
| |
| | if (num1 > -1)
| | return this.Items[num1];
| |
| | }
| |
| | return null;
| |
| | It looks to me as though 'this.Items.Count' should be tested first in
| | response to WM_SETFOCUS in order to prevent the control from trying to
| | retrieve an item from a non-existent collection. My workaround is to
call
| | 'base.DefWndProc' in the derived control in response to WM_SETFOCUS. I
| have
| | also come across problems in OnHandleDestroyed, which again seems to
| assume
| | that if there is a selection then there must also be a valid
| | ListViewItemCollection.
| |
| | Has anyone else run into these problems? Is it just a case of working
| around
| | the assumptions made in System.Windows.Forms.ListView or am I missing a
| step
| | when setting up my virtual list-view that would avoid these problems?
| |
| | TIA.
| |
| | --
| | Kevin Westhead
| |
| |
| |
|
|