Binding a RadMenu to a RadGrid row

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

    Posted 24 Feb 2014 Link to this post


    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:

    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?

  2. Plamen
    Plamen avatar
    2817 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. 

    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.
Back to Top