HEY,
How must i do if i want to display row number of data when export the grid?
Regards,
Samsun
1 Answers
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
Your Answer