Hello,
I have a listview bound to a datasource, each row has a checkbox control on it, what i want to acheive is when i press a button, i want to check through all of the checkboxes in the listview and check if any of them have been ticked.
What i tried first was to add a onclick event to a button and loop around the listview.items and check the "checked" state of the checkbox control, however, this always returned "false" even if they have ticked the item.
The only way i could get it to work is if i looped around all the listview items inside the onItemDataBound event, however this doesnt seem the most efficient way of doing it as it will call onItemDataaBound for every item in the listview, (thus called foreach on the listview.items each time)
I then tried doing the same on the OnDateBound event instead as this is only called once, but i ran into the same problem, it sees the checkboxes "checked" field as false all the time, i was wondering if anyone could point me into the right direction of the proper way to do it.
thanks Raj.