David Stacey
Top achievements
Rank 1
David Stacey
asked on 28 Nov 2013, 02:15 PM
I have implemted my own button client side to save the grids data when in batch edit mode.
After the ajax call what is the best way to remove the red marks (class="rgBatchChanged") and reset the batcheditManager ?
I don't wish to reload the grid data but retain the current page / filter selection.
Thanks,
David S
After the ajax call what is the best way to remove the red marks (class="rgBatchChanged") and reset the batcheditManager ?
I don't wish to reload the grid data but retain the current page / filter selection.
Thanks,
David S
6 Answers, 1 is accepted
0
Hello David,
I am not sure that I fully understand the scenario but if I am correct an external button is used to call the saveChanges method of the batch editing manager. If that is the case once the method is called the red marks should be cleared automatically. This leads me to the thought that the issue may by AJAX related. Please try disabling the AJAX and test whether this resolves the problem. If it does not please share with us the code of the page alongside with a detail explanation of the scenario.
Regards,
Angel Petrov
Telerik
I am not sure that I fully understand the scenario but if I am correct an external button is used to call the saveChanges method of the batch editing manager. If that is the case once the method is called the red marks should be cleared automatically. This leads me to the thought that the issue may by AJAX related. Please try disabling the AJAX and test whether this resolves the problem. If it does not please share with us the code of the page alongside with a detail explanation of the scenario.
Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
David Stacey
Top achievements
Rank 1
answered on 03 Dec 2013, 02:05 PM
I'm not calling the saveChanges method of the batch editing manager.
The get_batchEditingManger()._changes collection is used combined with other data client side, before a bespoke AJAX method is called
Is there a client side method i could call to clear the red marks and changes?
The get_batchEditingManger()._changes collection is used combined with other data client side, before a bespoke AJAX method is called
Is there a client side method i could call to clear the red marks and changes?
0
Hi David,
For achieving the desired result you can call RadGrid.get_batchEditingManager().cancelChanges. Note however that this will cause the grid to rebind. Currently in order for the grid to refresh a postback should occur.
Regards,
Angel Petrov
Telerik
For achieving the desired result you can call RadGrid.get_batchEditingManager().cancelChanges. Note however that this will cause the grid to rebind. Currently in order for the grid to refresh a postback should occur.
Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
romulo~
Top achievements
Rank 1
answered on 21 Jan 2016, 12:41 PM
Hello,
sorry for reviving an old post but iI'd like to know if the cancelChanges() method always calls the rebind on the grid.Can this rebind be cancelled or it would break the control?
0
David Stacey
Top achievements
Rank 1
answered on 21 Jan 2016, 01:17 PM
The cancelChanges didn't work for me so I did it myself
clearEdit:
function
() {
this
.get_masterTableView().cancelAll();
this
._innerGrid.get_batchEditingManager()._changes = {};
$(
'#'
+
this
._innerGridID +
' td.rgBatchChanged'
).removeClass(
'rgBatchChanged'
)
this
.repaint();
},
0
Hi guys,
Indeed currently when the refresh button is clicked a postback will occur and cancelling it will not delete the user changes. The approach provided in the last post is one possible solution to the matter.
Regards,
Angel Petrov
Telerik
Indeed currently when the refresh button is clicked a postback will occur and cancelling it will not delete the user changes. The approach provided in the last post is one possible solution to the matter.
Regards,
Angel Petrov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items