Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Creating a SortConditionCollection for UltraSpreadsheet
posted

We are using your UltraSpreadsheet for one of our forms.

We have added an 'Excel Like" Ribbon.   One of the controls on the Ribbon is for Sorting.   We have developed a dialog the allows the user to define multiple levels of sorting (e.g. Name Column, then Country, the City).    We now need to build a collection that allows us to describe this multi-level sort operation, and will then apply it to the spreadsheet.

Where we are stuck is creating the initial SortSettings variable.   The definition for this is Infragistics.Documents.Excel.Sorting.SortSettings<T>, and the documentation indicates  T is a type which logically contains data and can have sort condition applied to that data.Totally understand this, but what type of object can stand in for the "T".   So far every thing that we have tried has resulted in a "cannot be used as type parameter T syntax error.   It looks like it wants an "ISortable" class.   The closest appears to be a WorksheetColumnCollection.   Of course we need to sort multiple columns...not just one.

The variable definition of:

Infragistics.Documents.Excel.Sorting.SortSettings<Infragistics.Documents.Excel.WorksheetColumnCollection> theSortSpecifications;

is accepted by the C# compiler, but we have been unable to initialize the variable - theSortSpecifications.   Basically the "New" says that 

Infragistics.Documents.Excel.Sorting.SortSettings<Infragistics.Documents.Excel.WorksheetTableColumn>  does not contain a constructor that takes zero arguments. (or 1 argument when passed a WorksheetTableColumn).

Perhaps we are totally misunderstanding what the SortConditionCollection is for....what we need is a way to have a collection that defines multiple levels of sort, with each sort being a-Z or Z-A or based on a Formatting value.   Our current intent is to use the Add method on the SortConditions member of the SortSettings.

Suggestions?   Example?

Parents
No Data
Reply
  • 6120
    Offline posted

    Hello Mark,

    We are adding this feature in our 18.1 release which allows multiple levels of sorting in UltraSpreadSheet. With this new feature a region of the spreadsheet can be selected to apply the required sorting. Once this feature is available by selecting entire spreadsheet as a region and applying multiple levels of sorting you can achieve this.

    Please let me know if you have any questions.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer

Children
No Data