how to select a hilighted row from the listview.

  • Thread starter Thread starter shahla.saeed
  • Start date Start date
S

shahla.saeed

hi,
plz help me out how to select a hilighted row from the listview.
listView1.Items.Selected=true. does not solve my prblem bcoz "i"
is unkown to me. what i need is that user can select any row frm the
listview and from that selected row i want to retrive its first two
coloums.(both coloums have the data of string type)......
plzzz help meee, programaticalyy how can i do this...i hope i hv
explain the scenerio properly.
 
On 11/04/2007 in message
<[email protected]>
hi,
plz help me out how to select a hilighted row from the listview.
listView1.Items.Selected=true. does not solve my prblem bcoz "i"
is unkown to me. what i need is that user can select any row frm the
listview and from that selected row i want to retrive its first two
coloums.(both coloums have the data of string type)......
plzzz help meee, programaticalyy how can i do this...i hope i hv
explain the scenerio properly.


If it is not multi select trap the Selected Index Change event, check that
1 item is selected and SelectedItems[0] will be the one you want.
If it is a multi select List View then you need to iterate through all
SelectedItems.
 
Back
Top