Hi,
I am using the batch update of webdatagrid. I found that when I make a number of changes and go to another page, it will have a post back and force me to save the changes before user click the save button. Is there a way to prevent post back until the user hit the save button? thanks.
\--andrew
Hello Andrew,
Thank you for posting in our community.
We receieved your support request concerning WebDataGrid and I am currently looking into that matter for you. I will keep you posted on my progress and I will get back to you soon with more information or questions for you.
Please feel free to contact me if you have any additional questions regardinf this matter.
Since Paging behavior is enabled for WebdataGrid that means that postback will occur every time the page is changed in order to retirieve the data for the next page. This postback will force the batch updating to save all the changes made in the grid. Currently there is no way to prevent the postback bacuase tha data for the next page won`t be avaliable.
However what I can suggest for achieving your requirement is to use clearBatchUpdate() method in your PageIndexChanging client side event. This method will clear all the updates that have been made but not saved (in your scenario by clicking the Save button). For example:
[code]
function WebDataGrid1_Paging_PageIndexChangingChanging(sender, eventArgs)
{
var grid = $find("NameOfYourWebDataGrid");
grid.get_behaviors().get_editingCore().clearBatchUpdates();
}
I hope you find this information helpful.
Please let me know if you have any additional questions regarding this matter.