htabbach
asked on
SelectedIndex always returning -1 for a ListView (ASP.NET 3.5 and VB.NET)
Hello,
I have a listView with a select button, when I click on the select button the SelectedIndexChanged fires up but when I do ;
Dim i as integer
i = lvOffers.selectedIndex it always returns -1
any ideas why?
I have a listView with a select button, when I click on the select button the SelectedIndexChanged fires up but when I do ;
Dim i as integer
i = lvOffers.selectedIndex it always returns -1
any ideas why?
ASKER
No, I populate the list from OnSelectedIndexChanged event of a DataGrid control, so it only populates if the user click on the select button of the DataGrid
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I debuged the app and it only populates once and still returns -1. Do I have to have a selectedItemtemplate for it to return the selectedindex?
hope this helps :)