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

ColumnGroupDescriptor and column filtering

5 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 18 Jan 2014, 08:22 PM

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

Sort by
0
Yoan
Telerik team
answered on 20 Jan 2014, 11:48 AM
Hi Richard,

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
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
0
Richard Harrigan
Top achievements
Rank 1
answered on 20 Jan 2014, 03:26 PM

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

0
Yoan
Telerik team
answered on 23 Jan 2014, 06:06 PM
Hi 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
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
0
Richard Harrigan
Top achievements
Rank 1
answered on 23 Jan 2014, 07:15 PM

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

0
Yoan
Telerik team
answered on 28 Jan 2014, 01:42 PM
Hi Richard,

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
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
Tags
GridView
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Richard Harrigan
Top achievements
Rank 1
Share this question
or