Sorting OptionsConnector

How can one sort the values collected by an OptionsConnector and added through a renderTable();

This does not sort the entries apparently :

$listDisp = new OptionsConnector($conn, "SQLSrv"); $listDisp->sort("field1", "ASC"); // NO EFFECT $listDisp->render_table("table1","table1Id","field1(label), field2(value)"); $grid->set_options("field1",$listDisp);

Unfortunately this is by design, options connector is rather simple and doesn’t support sorting and filtering.

You can try to replace render_table with render_complex_sql

$listDisp->render_complex_sql("SELECT field1 a label, field2 as value from table1 ORDER BY field1","field1","field1(label), field2(value)");

Ok, used the render_complex_sql. Worked. Thanks.