Oooops, sorry Pete ... I meant to use the Text property of the SubItems. My bad. =(
And yes, you can use the sender parameter. You just cast it to a ListView. So, something like this:
ListView oList = (ListView)sender;
ListViewItem item = oList.SelectedItems[0];
int paydetailsid = (int)item.SubItems[10].Text;
int payaddressid = (int)item.SubItems[11].Text;
~~Bonnie
>Hello Bonnie, just thought I'd bring you up to date with lv saga, I tried the code you suggested but received an error ( not verbatim ) stating "Cannot cast Listview.Subitem to type int", I then tried this code which works
>
>
> ListViewItem item = this.lvClaims.SelectedItems[0];
> int paydetailsid = Convert.ToInt32(item.SubItems[10].Text);
> int payaddressid = Convert.ToInt32(item.SubItems[11].Text);
>
>
>thanks for putting me on the right track, is there a way of casting the sender parameter to retrieve the same info ?