Sorting Columns
Send Feedback

Glossary Item Box

Topic Overview

Purpose

This topic provides a conceptual overview of sorting columns in the IGGridView™ control.

In this topic

This topic contains the following sections:


Introduction

Swipe row summary

The IGGridView control’s data source helper classes allow you to use the sortedColumns property to sort columns in ascending or descending order. To use the sortedColumns collection, first create an IGGridViewSortedColumn object, initialize field names and declare sort direction.

In C#:

IGGridViewSortedColumn sortCol = new IGGridViewSortedColumn("firstName", IGGridViewSortedColumnDirection.IGGridViewSortedColumnDirectionAscending);
_dataSource.SortedColumns.Add(sortCol);

In Objective-C:

IGGridViewSortedColumn* sortCol = [[IGGridViewSortedColumn alloc]initWithField:@"firstName" forDirection:IGGridViewSortedColumnDirectionAscending];
[_dataSource.sortedColumns addObject:sortCol];

The sort direction supplied with the IGGridViewSortedColumn initialization method supports these enumerations.

  • IGGridViewSortedColumnDirectionAscending
  • IGGridViewSortedColumnDirectionDescending
  • IGGridViewSortedColumnDirectionNone
Note: The order in which the columns are added to the sortedColumns collection determines the sort order priority, with the first column added having the highest priority and so on.

Related Content

Topics

The following topic provides additional information related to this topic.

Topic

Purpose

This section serves as an introduction to the IGGridView’s key features and functionalities.