Vertical scroll at top and url variable

QuestionsVertical scroll at top and url variable
Leonardo Nencioni asked 11 years ago

Hi,
have two questions.

First in "default edit" demo example the vertical scroll is position to bottom of the grid, how set it on top?

Second i invoke my index.php file passing a variable in url if possibile on adding new record insert the value of variable (get with php command) into a field of the table set for the grid?

Thank you and good work!

Leonardo

1 Answers
Abu Ghufran answered 11 years ago

To set scroll top, you can set focus on first cell.

// set focus on first cell
setTimeout('jQuery(".editable:first").focus()',100);

http://pastebin.com/Tm3ws0Ut

You can set the passed querystring variable using defaultValue.

e.g.

$col["edit_options"]["defaultValue"] = $myvar;

It will only be present at time of inserting a record.
Refer docs for 'defaultValue' help.

Your Answer

15 + 20 =

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?