Selectedindex in listview, throwing up an error!
Posted
by Luke
on Stack Overflow
See other posts from Stack Overflow
or by Luke
Published on 2010-04-20T09:57:22Z
Indexed on
2010/04/20
10:03 UTC
Read the original article
Hit count: 269
c#
Hey guys, the following code shows what i am trying to do.
private void btnEdit_Click(object sender, EventArgs e)
{
iDeliverySelected = lstDeliveryDetails.SelectedIndex;
bool addEdit = false;
}
The selectedindex is throwing up the following error.. 'System.Windows.Forms.ListView' does not contain a definition for 'SelectedIndex' and no extension method 'SelectedIndex' accepting a first argument of type 'System.Windows.Forms.ListView' could be found (are you missing a using directive or an assembly reference?)
Any ideas why? First time I have tried to use SelectedIndex, not sure if i am using it correctly?
© Stack Overflow or respective owner