Can the new Drag and Drop feature use custom numbers? or can a event be called?

QuestionsCan the new Drag and Drop feature use custom numbers? or can a event be called?
Tim Moore asked 8 months ago

I would like to know if we can use a custom number for the row order. Or call an event on drag and drop so i can re-number another column myself? Example in picture below.

View post on imgur.com

Thanks in advance

Tim

1 Answers
Abu Ghufran Staff answered 8 months ago

Hi,

We can have custom sort field and then row drag-drop will change that field for ordering. In the demo, we have used database field sortfield name ‘roworder’.

$opt["sortrows"] = array("sortfield"=>"roworder", "position"=>"first");

Code: https://www.gridphp.com/demo/demos/apps/todos.phps
Demo: https://www.gridphp.com/demo/demos/apps/todos.php

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

6 + 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?