
hi
Is it possible to programmatically set a ColumnGroupDescriptor to allow column filtering. As you can see from my code I am setting IsVisible = false so that I don't show redundant info in each row. I would like the Group column header to show the filter icon and allow for the column to be filtered.
Thanks
Rich
ColumnGroupDescriptor colGrpDesc = new ColumnGroupDescriptor();
colGrpDesc.Column = grid.Columns[groups.UniqueName];
colGrpDesc.Column.IsVisible = false;
colGrpDesc.SortDirection = sortDirection;
grid.GroupDescriptors.Add(colGrpDesc);
5 Answers, 1 is accepted
Generally, you can add ColumGroupDescriptor like so:
this.myGridView1.GroupDescriptors.Add(new ColumnGroupDescriptor()
{
Column = this.myGridView1.Columns["Name"],
SortDirection = ListSortDirection.Descending
});
You can check this help article for more information about programmatic grouping.
If you want to hide specific column, you can set its IsVisible property like so:
this.myGridView1.Columns["Name"].IsVisible = false;
Regards,
Yoan
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>

Hi Yoan,
I don't think I made my question very clear. What I want to do is show the filter icon in the group header for each column that is grouped. This way I can filter the data based on a group column that does not also appear in the detail.
For example:
Group Header |Country| |State| |City|
Detail Header |Order ID| | Product | | Price | |Quantity| // Notice I made Country, State and City not visible to reduce redundancy.
The question is how can I get the State group header to show the filter icon (Not sorting) show that I can filter to only show selected states.
Thanks
Rich
Thank you for the clarification and excuse me for the misunderstanding.
I am afraid that there is no recommended way for achieving this functionality.
Please, do not hesitate to contact us if you have further questions.
Regards,
Yoan
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>

Hi Yoan,
Ok, not a deal breaker but for me a nice to have. Maybe you could submit it to the feature group for consideration?
Thanks
Rich
Thank you for your feedback.
Indeed your request is a reasonable one and we will definitely consider it in our future development plans, however I cannot commit an exact time frame for implementing it.
Regards,
Yoan
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>