I want to retrieve value from ListView Control named here as Product_listViewFF. When the user selects a row from ListView value of the first column in first row must be read.
When I used:- Product_listViewFF.SelectedItems[0].SubItems[0].Text
It works well when i select the row first time. But when i again select some other row it throws error as "InvalidArgument=Value of '0' is not valid for 'index' "
Can somebody why error occured on selecting the row second time and not on the first time?
Loading

Prabhu RajaRank #861 · 2.6K reputationPosted Oct 8, 2011, 2:50 AM EDT
Try this. (untested)
VulpesRank #55 · 29.2K reputationPosted Oct 8, 2011, 2:47 AM EDT
jasbirsingh chauhan10 reputationPosted Oct 8, 2011, 10:18 PM EDT
foreach(ListViewItem lvi in ListView1.SelectedItems)
{
}
Sam HobbsRank #107 · 20.5K reputationPosted Oct 9, 2011, 6:05 PM EDT