[SOLVED]DataRepeater ItemsAdded do not fire

0
0

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

  • You must to post comments
0
0

There was a bad variable in my code. The form was called by a object instead form directly

thanks and sorry

  • You must to post comments
0
0

Hi Levie,

ok but ItemUpdate it is triggerd many times, there is no events for ItemsAdded ?

  • You must to post comments
0
0

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

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.