This is a migrated thread and some comments may be shown as answers.

Grid header context menu

3 Answers 286 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kevin Fu
Top achievements
Rank 1
Kevin Fu asked on 25 Aug 2007, 10:43 AM

Hi,

Is it possible to custom the context menu on grid header?

In particular, I want to add a menu item for grouping my grid on one of the columns. That is the only one column my users are likely to group the grid, so I don't want to show the whole group panel.

I may want to add some anther menu items too.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 27 Aug 2007, 09:12 AM
Hi Kevin,

Currently there is no straight forward way to configure the context menu, but you can disable user-side grouping by setting the columns' AllowGrouping property to false:

// Disallow grouping for all columns 
for ( int i = 0; i < radGridView1.MasterGridViewTemplate.Columns.Count; i++) 
    radGridView1.MasterGridViewTemplate.Columns[i].AllowGrouping = false
 
// Allow grouping for the column "Company" 
radGridView1.MasterGridViewTemplate.Columns["Company"].AllowGrouping = true

Context menu customization is on our plans and we hope to have it implemented by the end of the year. Let us know if the above workaround helps in your case.

 
Sincerely yours,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ben
Top achievements
Rank 1
answered on 18 Mar 2009, 01:23 AM
Has the grid header context menu been made customisable yet? I have a need to add an item to the standard menu to allow a user to reset any grid layout settings (i.e. delete any existing layout XML file). Is this possible?

EDIT: Please ignore - I found another post which deals with this issue. http://www.telerik.com/community/forums/winforms/gridview/how-to-override-default-context-menu.aspx
0
Nikolay
Telerik team
answered on 18 Mar 2009, 08:27 AM
Hi Ben,

As you have noticed, you have the ability to customize the context menu in RadGridView. Please refer to the following help article for additional information: Custom Context Menus.

Regards,
Nikolay
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.
Tags
GridView
Asked by
Kevin Fu
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Ben
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or