Hi,
I have a couple of questions regarding the WinPivotGrid:
1) Is there a way to sort the rows alphabetically (Not using the sort indicator for a column at the right), it will work for me either with a UI button or programmatically.
2) Is there a way to sort the filter popup alphabetically? and is it possible to add a search box (Excel style)?
Regards,
Hello Edgar,
Sorting can be applied after the pivotgrid loads it's data. It's best to use the InitializeAsyncCompleted event, review the columns generated and use the Sort method. Like so,
void ds_InitializeAsyncCompleted(object sender, InitializeAsyncCompletedEventArgs e){FlatDataSource ds = sender as FlatDataSource; ds.GetHierarchiesAsyncCompleted += new GetHierarchiesAsyncCompletedHandler(ds_GetHierarchiesAsyncCompleted);ds.GetHierarchiesAsync(this.grid); //Sort first column's data descendingthis.grid.Columns[0].Sort(ListSortDirection.Descending);}
ds.GetHierarchiesAsyncCompleted += new GetHierarchiesAsyncCompletedHandler(ds_GetHierarchiesAsyncCompleted);ds.GetHierarchiesAsync(this.grid);
//Sort first column's data descendingthis.grid.Columns[0].Sort(ListSortDirection.Descending);}
As for the FilterSelector popup, the FilterSelectorDisplaying event does not provide a way to override and sort the list shown. Both this and having an Excel-style searchbox in this popup is considered a feature request.
You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
There are many benefits to submitting a product idea:
- Direct communication with our product management team regarding your product idea. - Notifications whenever new information regarding your idea becomes available. - Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time. - Allow you to shape the future of our products by requesting new controls and products altogether. - You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea: 1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed). 2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.) 3. Add your product idea and be sure to be specific and provide as much detail as possible.
• Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.
Sincerely, Michael Di Filippo Developer Support Engineer Infragistics, Inc. www.infragistics.com/support
Thanks for your response. I understand about the feature requests for the filter selector popup, I will submit them.
Regarding the sorting of the grid, I apologize if I wasn't clear enough in my question. What I'm trying to achieve is to sort the WinPivotGrid alphabetically on the first hierarchy that is added as Rows, like for example if you have your Customers in the Rows and your Sales Person on the Columns and you are measuring Sales Amount, I want to sort the Customers Alphabetically, not by the amount sold.
The code you provide will sort based on the measures displayed on the first column, that is not what I'm trying to achieve, I want to be able to sort the Rows Hierarchy even if I haven't added any measure
From what I understand you wish to include a sort comparer like function to sort by the row headers; sort vertically based on the text of the row’s header, as opposed to by cell values? After further investigation this also has been declared a new product idea. When you have time to enter one please mention that you wish to have a SortComparer property.
Let me know if you have any questions regarding this matter.
Hello,
I'd like to know if those product ideas (custom sorting for row headers and the filter popup) are implemented (or if there is any schedule).
If that's not the case (or the schedule is distant future) I'd like to know if any workaround exist for using UltraWinPivotGrid with FlatDataSource (should I maybe manually sort the data somehow?)
I'd like at least a workaround, because the very first thing our customers will ask is "why the hell are the dates not sorted properly in the filter?"
With best regards,
Tymur Gubayev