RadMenu in asp:Repeater

3 posts, 1 answers
  1. John Hadjioannou
    John Hadjioannou avatar
    30 posts
    Member since:
    Dec 2005

    Posted 24 Jul 2009 Link to this post

    I'd like to use a RadMenu in a Repeater with the NavigateUrl properties set from fields in the current record, but I don't seem to be able to find a way of making it work - any help much appreciated.

    John

    (irrelevant code removed - there are other fields displayed withing the <td>)

     
    <table>   
         <tr>   
            <asp:Repeater ID="Repeater1" runat="server" DataSourceID="FeatureSource">   
                <ItemTemplate>   
                    <td>   
                                    <telerik:RadMenu ID="RadMenu1" runat="server">   
                                        <Items>   
                                            <telerik:RadMenuItem runat="server" Text="map" NavigateUrl='<%#Eval("FeatureMapUrl")%>'>   
                                            </telerik:RadMenuItem>   
                                            <telerik:RadMenuItem runat="server" Text="what goes on" NavigateUrl='<%#Eval("FeatureListUrl")%>'>   
                                            </telerik:RadMenuItem>   
                                            <telerik:RadMenuItem runat="server" Text="diary" NavigateUrl='<%#Eval("FeatureDiaryUrl")%>'>   
                                            </telerik:RadMenuItem>   
                                        </Items>   
                                    </telerik:RadMenu>   
                     </td>   
                </ItemTemplate>   
            </asp:Repeater>   
        </tr>   
     </table>   
     

     

  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Jul 2009 Link to this post

    Hello John Hadjioannou,

    Unfortunately this is not supported. The menu items cannot evaluate the databinding expressions as they are child controls. I recommend you subscribe to the ItemDataBound event of your Repeater and populate the NavigateUrl from code.

    Greetings,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. John Hadjioannou
    John Hadjioannou avatar
    30 posts
    Member since:
    Dec 2005

    Posted 24 Jul 2009 Link to this post

    Thank you, I have done as you suggested and it now works.

    John
Back to Top