Persist changes after setCell

QuestionsPersist changes after setCell
Michiel Blotwijk asked 5 years ago

Hello Abu,

I created a custom button on the row that updates a cell on that row. This works as planned, except for the fact that it doesn’t persist the change. Could you please point me in the right direction?

Partial code: https://gist.github.com/MichielBlotwijk/3a8f9d6a6f19327dfd9bf1abd4601b05

regards,
Michiel

 

2 Answers
Abu Ghufran Staff answered 5 years ago

The setCell function only change on client side. To save on database you need to post ajax call.

Refer this code: http://phpgrid.org/demo/demos/apps/todos.phps line 541.

Alter above code and you need to set:

request[‘oper’] = ‘edit’; // -> operation
request[‘id’] = id;  // -> row id
request[‘Archief’] = -1; // -> field with value

then post ajax like in above code.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Michiel Blotwijk answered 5 years ago

Abu, your response time is amazing and the quality of your answer even better!

Thanks, it worked as advertised!

Michiel

Your Answer

10 + 5 =

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?