How must i do if i want to display row number of data when export the grid?
You can create a virtual column e.g. 'row'
$col = array();
$col["title"] = "row"; // caption of column
$col["name"] = "row";
$col["hidden"] = true;
$cols = $col;
and for export listing, use this sql syntax.
$g->select_command = "SELECT @row := @row + 1 as row, t.* FROM clients t, (SELECT @row := 0) r";
more help from this link: http://stackoverflow.com/questions/304461/generate-an-integer-sequence-in-mysql
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?