hey J
I m using repeater and so far i converted code here.see the bold part .i m not using list view .
this line Listview1.DataKeys(lvi.DisplayIndex).Value is for list view i want this line converted for repeater.
Code:public void AddRowstoIDList() { // Loop through all the current items in the Listview foreach (RepeaterItem item in rptExtraInfo.Items) { CheckBox chkbox = (CheckBox)item.FindControl("chkBox"); if ((((chkbox) != null))) { int ID = Convert.ToInt32(rptExtraInfo.Items[item.ItemIndex].ItemIndex); if ((chkbox.Checked && !this.IDs.Contains(ID))) { // Add the ID to our list this.IDs.Add(ID); } else if ((!chkbox.Checked && this.IDs.Contains(ID))) { // Not checked - remove the ID from our list this.IDs.Remove(ID); } } }



LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks