We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Menu control in Column Header (Grid Grouping Control)

I was wondering if anyone has a sample of adding menus to the column header in a Grid Grouping Control (ASP.NET). I would like to be able to click a column header and have a menu display with various tasks (e.g., Sort, Graph, Calculate Ave, etc). I guess what I am asking is how to capture a click event on the Column Header and then build up a popup menu if that is possible. Thanks.

David.

7 Replies

SI Sivakumar Syncfusion Team August 31, 2006 08:05 PM UTC

Hi David,

Our grid supports providing templates for the headers. You can use this feature and can use the ''Menu control'' or button and menu control for the header and acheive this
behavior

The following steps illustrates adding a control in header template using the Template Editor

a) Right-click on the Grid and choose Edit Template->Item Templates.

b) This brings up the Item Templates Editor for the Grid. Modify the HeaderTemplate by adding the ''Menu Control'' or combination of any control
to acheive the desired behavior.

c) Right-click on the Template Editor and choose End Template Editing. This will close the Template Editor.

d) Switch to the HTML-view and modify the template according to your needs.

As you already know from you can also add this template through code. we also started working on a sample illustrating the above.
we will update you as soon as possible with a sample.


Thanks,
A.Sivakumar


DA David A. Gonzales August 31, 2006 08:35 PM UTC

Thanks for the information. I thought is was possible as your controls are very customizable. I will be looking for the sample when it is released. Thanks.

David.


SI Sivakumar Syncfusion Team September 1, 2006 09:22 PM UTC

Hi David,

While working on the sample we could able to understand that menu control is not an option because it shows some unexpected behavior, so we are looking for some other way to implement it in a sample.

We will update you as soon as possible.

Thanks for your patience

Regards,
A.Sivakumar



SI Sivakumar Syncfusion Team September 4, 2006 10:45 PM UTC

Hi David,

We herewith attached the sample which uses templates in column header to acheive the behavior you mentioned

MenuInHeader.zip


We use Syncfusion tools.web''s popup control in this sample to acheive the behavior you mentioned.
we use button as a template control for the column header and then when clicking on this
button a popup will occur in the column header cell, which will have link buttons used for sorting grouping, etc...

The sample is customizable according to your needs. In the sample we use different popup''s for different column
and we are also in the process of analysing a way to reuse the same popup and to get the column in server side.

please let us know if you need furthur assistance.

Best Regards,
A.Sivakumar


SI Sivakumar Syncfusion Team September 4, 2006 10:57 PM UTC

Hi David,

Sorry for the broken link in previous post, please try the below link to download the sample.

MenuInHeader.zip


Best Regards,
A.Sivakumar


DA David A. Gonzales September 5, 2006 01:26 PM UTC

Thank you. I will look at the sample. I too found some problems with using the Menu control and was looking into using the popup control.

David.


DA David A. Gonzales September 5, 2006 04:46 PM UTC

Thanks. The sample was most helpful. I did have to add a .DataMember = "DefaultView" in the Page_Init to get the thing to come up but other than that it works. I did use CSS to "pretty" up the links but everyting seems to work ok. Thanks again!

David.

Loader.
Live Chat Icon For mobile
Up arrow icon