Row numer on export

QuestionsRow numer on export
Samsun asked 10 years ago


How must i do if i want to display row number of data when export the grid?


1 Answers
Abu Ghufran answered 10 years ago

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:

Your Answer

16 + 0 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?