$grid sort by todays date

Questions$grid sort by todays date
Devon asked 7 years ago


Was hoping to load the grid by todays date being at the top?


1 Answers
Abu Ghufran answered 7 years ago


Do you need something like in this post:

Changes required in grid code …

$opt["sortname"] = 'ABS(diff)';

// you can provide custom SQL query to display data
$g->select_command = " SELECT *, DATEDIFF(`invdate`, CURDATE()) AS diff FROM `invheader`";

Your Answer

10 + 3 =

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?