2 posts, 1 answers
  1. salini
    salini avatar
    1 posts
    Member since:
    Oct 2010

    Posted 08 Nov 2010 Link to this post

    how to get a column value on the click of a context menu item on a grid view
  2. Answer
    Alexander avatar
    306 posts

    Posted 11 Nov 2010 Link to this post

    Hello Salini,

    Thank you for your question.

    You can handle ContextMenuOpening event of RadGridView to find the column for which the menu is opened:
    private string columnName;
    private void radGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
        GridHeaderCellElement contextMenuProvider = e.ContextMenuProvider as GridHeaderCellElement;
        if (contextMenuProvider != null)
            columnName = contextMenuProvider.ColumnInfo.Name;
            columnName = this.radGridView1.CurrentColumn.Name;

    I hope it helps.

    Best regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top