Only update rows that were modified

QuestionsOnly update rows that were modified
Melissa Yip asked 6 years ago

In your Editing/Default Edit example you make an AJAX call for every row with ‘saveRow’ regardless of whether it was modified. I attached an event handler to each field that is editable and only iterated over those row ids with jQuery(“#list1”).jqGrid(‘saveRow’, id);

The problem I see is that after the calls are complete that only only those rows switch back to normal state. The rest of the rows are still in edit state.

View post on imgur.com

https://gist.github.com/melissathinkiq/db38ec75d3215ab8c41f5de6f54f33ec

Thanks.

6 Answers
Abu Ghufran Staff answered 6 years ago

You can use restoreRow for the id that are not changed.

jQuery(“#tags”).jqGrid(“restoreRow”, id);

I’ll try to change demo and update.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Abu Ghufran Staff answered 6 years ago
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Melissa Yip answered 6 years ago

That worked, thanks.

Melissa Yip answered 6 years ago

Is there any way to create custom icons for Edit All and Save All buttons that are placed where the grid operation action buttons are?

 

View post on imgur.com

Melissa Yip answered 6 years ago

Nevermind. I found the demo example with the answer. Thanks.

Abu Ghufran Staff answered 6 years ago
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

10 + 10 =

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?