Re: Selecting Listview Rows
From: Tim Wilson ("Tim)
Date: 03/30/04
- Next message: David W: "OpenNet.CF ButtonEx slower to draw than normal Button"
- Previous message: Y. Sivaram: "Re: The windows button"
- In reply to: Jeff: "Selecting Listview Rows"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Mar 2004 00:03:21 -0500
Are you trying to do multi-selection or just single-selection? I have tried
code similar to the code you posted and I do not see an issue. You might
need to post more of a complete picture as to what you are trying to do. In
addition, I don't specifically remember and issue like this but if you are
not already you may consider moving to CF SP2 to see if that helps at all.
http://www.microsoft.com/downloads/details.aspx?FamilyID=10600643-09b3-46d8-ba28-bc494bc20d26&DisplayLang=en
--
Tim Wilson
.Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
"Jeff" <jeffg22@mindspring.com> wrote in message
news:d3ebee6.0403291926.7de014da@posting.google.com...
> Hi -
>
> I'm having a problem programmatically selecting listview items.
>
> I have a listview (Details view) with 59 rows, showing 7 visible rows.
> My first selection runs fine, but my second selection throws a native
> exception. For example, the following 4 statements run fine:
>
> frmlist.lvwList.Items(9).Focused=True
> frmlist.lvwList.Items(9).Selected=True
> frmlist.lvwList.EnsureVisible(9)
> frmlist.lvwList.Refresh
>
> But if I try to repeat the process, I get the exception on the
> selected statement:
>
> frmlist.lvwList.Items(25).Focused=True
> frmlist.lvwList.Items(25).Selected=True
>
> The error (displayed on the emulator screen) is:
>
> "A Native exception has occurred in MyApp.exe. Select Quit and then
> restart this program, or select Details for more information."
>
> (If I select the Details button, nothing happens.) Quit terminates
> the session.
>
> What am I doing wrong??
>
> Thanks for your help.
>
> - Jeff
- Next message: David W: "OpenNet.CF ButtonEx slower to draw than normal Button"
- Previous message: Y. Sivaram: "Re: The windows button"
- In reply to: Jeff: "Selecting Listview Rows"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|