dataRepeater1 foreach all items

0
0
Can you share a method where I can return all the data in dataRepeater1?
  • You must to post comments
0
0

Hi Onur,

typically the DataRepeater is used in a virtual mode and the items collection only contains a fixed number of items
(usually the visible and a couple of prefetched ones).
If your DataRepeater is bound to Data the best way is to iterate through the bound collection (BindingList, etc.) instead.

Best regards
Frank

PS: If you populating the data manually you could also just use a *LayoutPanel and fill it with single panels.
Then you can simply iterate through *LayoutPanel.Controls.

  • Onur DOĞAN
    hi, I want to read all the items in the datarepeater. With the code below, I can only read what appears on the screen. foreach (DataRepeaterItem item in dataRepeater1.DisplayedItems) { var quest= (Label)item.Controls.First(x => x.Name == “QUESTION”); }
  • Luca (ITG)
    Those are all the items in the datarepeater. It can handle unlimited data with few display (control) items. The data items are in the data source. To get the updated (with data) item use the UpdateItem event.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.