My Listview control contains 4 columns and 30 rows. I can retrieve the row number by using:
//get row of listview item
ListViewDataItem item1 = e.Item as ListViewDataItem;
int findMe = item1.DisplayIndex;
How do I then get values from one or all 4 columns?
I was trying:
this.lblReponseRoute.Text = item1.FindControl("routenameLabel").ID.ToString();
UPDATE1:
The final solution is:
//get row of listview item
ListViewDataItem item1 = e.Item as ListViewDataItem;
int findMe = item1.DisplayIndex;
//find label value
var routeLabel = (Label)ListView1.Items[findMe].FindControl("routenameLabel");
this.lblReponseRoute.Text = routeLabel.Text;