Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by mahesh on Nov 20, 2009 09:07
open dhtmlx forum
mySQL, dhtmlx grid, auto column sorting revisited

I corrected a mySQL rendering to autosort along the following lines.

$grid->render_sql("SELECT * FROM pphone_rad ORDER BY item_id ASC", "item_id","name,pager,office");

When I do this the sorting is fine, but then clicking on the top header line no longer appears to sort that column alphabetically or reverse alphabetically.  Is this correctable or expected behavior?  Thanks

Answer posted by Stanislav (support) on Nov 23, 2009 08:20
This is expected behavior, the sorting state from the client side is added to the one, predefined in the SQL, so you have something similar to 

            ORDER BY item_id ASC, name DESC


Answer posted by mahesh on Nov 23, 2009 08:33
Thanks, sort of interesting problem, but I can live with it!