c# - Get Repeater's Items -
I'm trying to get the check box of all the checkers of the repeater before the page movement (pagination) Trying to store at a location.
foreach (Repeater IIT. Items in RPT) {check box box = (checkbox) ri.FindControl ("chkBox"); If (box check) {...}}
The problem is that where can I call this function? I have tried to select it from ObjectDataSource1. (I use ObjectDates to populate the repeater) and ObjectDataSource 1 selecting but RTP Items are also count 0.
The rpt_PreRender () event returns the correct number of items but this does not happen before selecting the check box.
What can I do?
The way you are looking it is not possible ... plz to use this code Try ...
if (repeater 1. item calculation> 0) {for (int count = 0; count & lt; repeater 1. item; count; count ++ ) {Checkbox chk = (checkbox) repeater 1. Item [count] .FindControl ("checkbox 1"); If (chk.Checked) {}}}
Comments
Post a Comment