Sorting a column which is not loaded from DB but calculated

Hi everybody,

I discover the dhtmlxGrid which seems to have some of the features I need. I want to understand the behaviour of the grid before to go further.

I want to add some columns to the grid, columns which are not in the DB. For example : I have 2 columns in my DB which are the number of books sold and books sent to distributors. After the SQL request where I load these columns, I do a simple calculation to determine the number of books unsold.

I want to add this column to the grid and moreover, I want to be able to sort this column like the other one. Is it possible with the dhtmlxGrid ?

I tried with some other jquery grid and it doesn’t work because the sort event on a column does a request with the id of the column in the SQL request. But, this column doesn’t exist in the DB, so it crashes.

thanks for answer

If you are loading all rows at once, you can use client side sorting. If you are using dynamic loading, you should use server side sorting.