Hi,
I’m try to do DataRepeater item with alternate rows, but the event ItemsAdded do not fire
If I do right click on event and I choose goto definition, the wisej code is this:
Public Event ItemsAdded As DataRepeaterAddRemoveItemsEventHandler
I think there is a bug in the name of the event name
regards
Cristian Zerbinati
Hi Cristian,
If you want to manipulate the rows, you should use the “ItemUpdate” event of the DataRepeater. You can attach a handler and do something like this:
private void dataRepeater1_ItemUpdate(object sender, DataRepeaterItemEventArgs e) { e.DataRepeaterItem.BackColor = (e.DataRepeaterItem.ItemIndex % 2) == 0 ? Color.Yellow : Color.Red; }
The ItemsAdded event fires when new items are added to the data source.
HTH,
Levie
Hi Levie,
ok but ItemUpdate it is triggerd many times, there is no events for ItemsAdded ?
There was a bad variable in my code. The form was called by a object instead form directly
thanks and sorry
Please login first to submit.