Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1126
  • Last Modified:

Identify Row Clicked in a ListView control? (Compact Framework)

I'm working in VB .Net Compact Framework, with a ListView control.

What's the best way to identify the row clicked, and return data
from one of the columns ... to a textbox control?

Which event should handle the screen tap?  
Click and MouseDown events don't seem to fire when
tapping the screen, and there is no double-click event?

In searching various help areas, there doesn't seem to be samples that relate specifically to the compact version of the control, I'm suprised?

Tom
0
TomMuschamp
Asked:
TomMuschamp
  • 2
1 Solution
 
gregoryyoungCommented:
since you are using a listview control I would also suggest looking at this http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/CompactFramework/samples/ListViewSort/ListViewSort.src

there is a click event (which works here) there is also the selected index changed event which you could use ...
0
 
TomMuschampAuthor Commented:
gregoryyoung
    Thanks, I looked thru this before and didn't have much luck with it. I know it says "compact framework" but unless I'm not initiallizing the control properly, the Click event just doesn't fire for me, and I don't know why? This article also didn't give me any help on highlighting a selected row, or returning row data to a field.

I want to list data in a grid, allow a user to select a row, and then return that row's data to a form. Should I be using the DataGrid control instead? I have used the standard VB6 ListView control in the past and it worked fine. In the compact version it seems to be very limited?

Tom
0
 
gregoryyoungCommented:
the compact version is limited but I have not had issues with the click event.

As for the datagrid, this is another route you can take.

As for the article I was just mentioning it as it is somewhat usefull with the listview :)
0
 
enterprise2010Commented:
The above link no longer works.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now