Sorting using column name instead of column index

I want to sort a datastore synced with a grid by column.

I can’t use the column index inside the dhx_sort parameter, since my connector doesn’t know what the column index refers too. What I’d like to use is the column name, which corresponds to a field in my db table.

So to sum things up, I’d like to convert the call to the connector from:[0]=asc


Is it possible, is there an alternative solution?


You may get the label of the column knowing it’s index:

var colLabel=mygrid.getColLabel(ind);