Store selected rownum into session

QuestionsStore selected rownum into session
Chris Henderson asked 6 years ago


I want to store the user's selected rownum into the session variable, how can I go about this?



3 Answers
Abu Ghufran answered 6 years ago


You can get JS callback of row selection (refer editing/custom-events.php) js_on_select_row.
And then in function you can write some ajax call to send selected ID on php side and save it in session.


Chris Henderson answered 6 years ago


I don't think I explained very well, it is the number of records displayed in the grid which I believe is saved in RowNum that I am after.

E.g. If I have the selections set to –

$grid["rowList"] = array(50,100,200);

with a default of –

$grid["rowNum"] = 50;

If the user changes it to 100, I want to save the 100 in session to use the next time the user goes to the page.



Abu Ghufran answered 6 years ago


Following code might solve your need.

if (!empty($_GET["rowNum"]))
$grid["rowNum"] = $_GET["rowNum"];
$grid["rowNum"] = 50;

Your Answer

12 + 12 =

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 / 5. Vote count:

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

Let us improve this post!