Number of questions 1,751
Number of tests completed 250,177
Number of questions answered 3,739,532
Number of registered users 19,109
Sign In | Register
Skip Navigation Links
Question: protected void repeatQuestion_ItemDataBound(object sender, RepeaterItemEventArgs e) { if(e.Item.ItemType==ListItemType.Item) { //Does something.... } 'Does something' only gets processed for every 2nd row that is data bound What needs to change to make sure that 'Does something' gets processed for every row?
Answer1: Change the event from repeatQuestion_ItemDataBound to repeatQuestion_OnDataBinding
Answer2: Add an OR condition to the if statement stating e.Item.ItemType == ListItemType.AlternatingItem
Answer3: Change the if statement to read e.Item.ItemType == ListItemType.AlternatingItem
Answer4: Change the event from repeatQuestion_ItemDataBound to repeatQuestion_rowDataBound
Answer5:
Answer: Add an OR condition to the if statement stating e.Item.ItemType == ListItemType.AlternatingItem

Explaination: Item - An item in the list control. It is data-bound. AlternatingItem - An item in alternating (zero-based even-indexed) cells. It is data-bound.
Link: External Explaination

Correctly answered: 10661
Incorrectly answered: 14618
Terms of Use
contact@quiznetonline.com Ver. 2.0.6783.38332