Try our conversational search powered by Generative AI!

MenuList ItemDataBound



I want to listen to the ItemDataBound event to be able to calculate first and last item that is bound to a MenuList. MenuList control does not seem to support this event?

Mabye this can be accomplished in some other way?


Oct 22, 2008 15:23

No, the EPiServer controls are missing these features.

One way to get around this issue is to create a UserControl that you place in the ItemTemplate (or similar) and place your code in the OnDataBinding method of that control. Just make sure that you call base.OnDataBinding() the first thing you do in that method.


Oct 23, 2008 0:02

One other way of doing it is to make your own menuList, that inherit from episervers menulist. Take a look with reflector and check CreateChildControls()


Oct 25, 2008 23:26

Great ideas,

Writing my own custom menulist would be great but unfortunately there's no time for that in this project. Frown

I did solve it in a similar way as Henrik suggested.


Edited, Oct 26, 2008 18:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.