• micc
  • Newbie Topic Starter
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
.AddItem 1, igSortAsc, igSortByExtraData
.AddItem 1, igSortAsc, igSortByCellTextNoCase
End With

Is it not possible to sort by x values from only one cloumn?
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.