I have a grid that opens up a fancybox on a nested item, it updates the tables and then when the fancybox closes the grid should reload the datasource and rebind.
JS
Code Behind
The problem is that is actually calling the rebind, but the grid doesn't update, then when I click on any other button I get the following error:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
I can't see why this is happening? Other Rebinds using onClick events are working 100%.
Can someone please advise me on how to reload the grid on closing of a fancybox.
Thank you.
JS
$(
"a.verifyAnalyst"
).fancybox({
'width'
:
'100%'
,
'height'
:
'100%'
,
'autoScale'
:
true
,
'transitionIn'
:
'none'
,
'transitionOut'
:
'none'
,
'type'
:
'iframe'
,
'onClosed'
:
function
() {
$find(
"<%=WIPAjaxManager.ClientID%>"
).ajaxRequest(
"Rebind"
);
}
});
protected
void
WIPAjaxManager_AjaxRequest(
object
sender, AjaxRequestEventArgs e)
{
if
(e.Argument ==
"Rebind"
)
{
WorkInProgressMainGrid.MasterTableView.SortExpressions.Clear();
WorkInProgressMainGrid.MasterTableView.GroupByExpressions.Clear();
WorkInProgressMainGrid.Rebind();
}
}
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
I can't see why this is happening? Other Rebinds using onClick events are working 100%.
Can someone please advise me on how to reload the grid on closing of a fancybox.
Thank you.