DataTables is breaking after a partial refresh. I'm completely stumped.
DataTables is breaking after a partial refresh. I'm completely stumped.
IceThatJaw
Posts: 1Questions: 0Answers: 0
I am using this amazing plugin with an ASP.Net GridView and Listview and I am building a custom SharePoint webpart with a grid. I have an edit button and a new button that pops up the edit and new forms in the SP Dialog window but everytime a partial postback occurs using an updatepanel, DataTables breaks.
But as soon as I refresh my browser with f5 it works again. I have absolutely no clue why this is happening. Any ideas?
Since I want the partial postback to occur when they close the dialog window I manually refresh it with script:
[code]
// Dialog close event capture function
function CloseCallback(strReturnValue, target) {
if (strReturnValue === SP.UI.DialogResult.OK) // Perform action on Ok.
{
__doPostBack('<%= BtnPB.ClientID %>', '');
}
if (strReturnValue === SP.UI.DialogResult.cancel) // Perform action on Cancel.
{
//alert("User clicked Cancel!");
}
}
$("#<%=GridViewExample.ClientID%>").GridviewFix().dataTable();
[/code]
Then in my code behind I do not check for Page.IsPostBack so that my grid refeshes everytime. Any ideas why DataTables breaks during the asych updates?
But as soon as I refresh my browser with f5 it works again. I have absolutely no clue why this is happening. Any ideas?
Since I want the partial postback to occur when they close the dialog window I manually refresh it with script:
[code]
// Dialog close event capture function
function CloseCallback(strReturnValue, target) {
if (strReturnValue === SP.UI.DialogResult.OK) // Perform action on Ok.
{
__doPostBack('<%= BtnPB.ClientID %>', '');
}
if (strReturnValue === SP.UI.DialogResult.cancel) // Perform action on Cancel.
{
//alert("User clicked Cancel!");
}
}
$("#<%=GridViewExample.ClientID%>").GridviewFix().dataTable();
[/code]
Then in my code behind I do not check for Page.IsPostBack so that my grid refeshes everytime. Any ideas why DataTables breaks during the asych updates?
This discussion has been closed.