Selectedindex in listview, throwing up an error!
- by Luke
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?