New to Telerik UI for ASP.NET AJAX? Download free 30-day trial


The OnClientItemPopulated client-side event occurs when an item in the menu has just had its child items populated from a Web service.

The event handler receives two parameters:

  1. The instance of the menu firing the event.

  2. An eventArgs parameter containing the following methods:

  • get_item returns a reference to the RadMenuItem that just had its list of child items filled by a Web Service.

  • get_domEvent returns a reference to the DOM event.

You can use this event to tweak the child items that have just been added:

<script type="text/javascript">
    function itemPopulated(sender, eventArgs) {
        var items = eventArgs.get_item().get_items();
        for (var i = 0; i < items.get_count(); i++) {
            var item = items.getItem(i);
            if (item.get_value() == "SummerLine") {
            else if (item.get_value() == "PremiumLine") {
<telerik:RadMenu RenderMode="Lightweight" ID="RadMenu1" runat="server" Skin="Default" OnClientItemPopulated="itemPopulated">
    <WebServiceSettings Path="ProductOfferings.asmx" Method="GetProductsByCategory" />
        <asp:Image runat="server" ID="LoadingImage" ImageUrl="~/Ajax/Img/loading7.gif" ToolTip="Loading..."
            Width="81px" Height="21px" />
        <telerik:RadMenuItem Text="Games" ExpandMode="WebService">
        <telerik:RadMenuItem Text="Tools" ExpandMode="WebService">
        <telerik:RadMenuItem Text="Business" ExpandMode="WebService">

See Also

In this article