Dynamically generate ContextMenu

2 posts, 1 answers
  1. Yogesh
    Yogesh avatar
    9 posts
    Member since:
    Jul 2012

    Posted 17 Jul 2012 Link to this post

    Dear Team,

    I have an assignment to check the rad grid cell and if the cell has expected value then assign a context menu to the cell. Can anyone help me with the following:

    1) attach the context menu on required cells only
    2) Create separate context menu object for every cell which qualify the cell.

    RadContextMenu oRadContextMenu = (RadContextMenu)RadContextMenu;
                        ContextMenuControlTarget oMenuTarget = new ContextMenuControlTarget();
    GridTableCell gtcPreviousCell = (GridTableCell)e.Item.Cells[(e.Item.Cells.GetCellIndex(radCell)) - 1];
                                if (sColumnName == gtcPreviousCell.Column.UniqueName.ToString())
                                    gtcPreviousCell.ID = sCellValue;
                                    oMenuTarget.ControlID = gtcPreviousCell.ID;

    Thanks and Regards,
    - Yogesh
  2. Answer
    Eyup avatar
    3691 posts

    Posted 19 Jul 2012 Link to this post

    Hello Yogesh,

    Please refer to the following thread where I have already replied to your post:

    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top