micc
  • micc
  • Newbie Topic Starter
2017-08-17T05:24:00Z
i mimic a file/folder view with the iGrid and need to sort the iGrid by two different values which are stored at the same column.

The first value is stored as ExtraData (0=folder,1=file).
The second value is the cell text (file/folder names).

I used this code, but it looks like the 2. AddItem overwrites the 1. AddItem:

With iGrid.SortObject
.Clear
.AddItem 1, igSortAsc, igSortByExtraData
.AddItem 1, igSortAsc, igSortByCellTextNoCase
End With


Is it not possible to sort by x values from only one cloumn?
Igor/10Tec
2017-08-31T08:11:02Z
Sorry for a delay with answer to this question.

You touched an interesting point. Theoretically you can specify two columns in the SortObject to implement what you need. But if this does not work in your case, can you send us a sample that demonstrate this issue?

An alternative and recommended way to implement this functionality is custom sorting. Specify the igSortCustom sort type for the required column and write your own comparison algorithm in the CustomSort event of iGrid.