Binding a RadMenu to a RadGrid row

2 posts, 0 answers
  1. Chris
    Chris avatar
    9 posts
    Member since:
    Feb 2009

    Posted 24 Feb 2014 Link to this post

    Hi

    I have a RadMenu inside a RadGrid Template row. The goal is to use Eval() to configure properties of the menu items by operating on the grid row, not the menu. I understand that because the menu is a naming container itself this is not directly possible.

    for example <telerik:radMenuItem text='<%# Eval("SomeFieldName") %>' /> and the result would be that the text of the menu item is taken from the value of the "SomeFieldName" column of the row that it appears on.

    There is a similar thread here from five years ago:
    http://www.telerik.com/forums/radgrid-template-column-and-binding-to-radmenu

    which offers a workaround but the link to that workaround is dead.

    So, five years later and this is still a problem. We need to be able to bind radmenu items to the rows of a radgrid. It seems really obvious to me that this is something everyone would want to do, and to do it easily.

    What can you suggest as a practical solution?

    Thanks
    Chris
  2. Plamen
    Admin
    Plamen avatar
    2730 posts

    Posted 27 Feb 2014 Link to this post

    Hi Chris,

    As far as I could understand you are trying to bind your RadMenu inside the ItemTemplate. The only way to achieve the desired behavior by using the RadGrid1_ItemDataBound event and bind the RadMenu as for example in this on-line demo

    Hope this will be helpful. 

    Regards,
    Plamen
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top