Controls not working after Export to Excel or Export to PDF
Add the following script to your webpart / custom control that need to have export and other controls functionals
So here you go with the working solution.
<script type="text/javascript" language="javascript">
//sharepoint postback to work after clicking on export
to excel button
if (typeof
(_spBodyOnLoadFunctionNames) != 'undefined'
&&
_spBodyOnLoadFunctionNames != null) {
_spBodyOnLoadFunctionNames.push("supressSubmitWraper");
}
function supressSubmitWraper() {
_spSuppressFormOnSubmitWrapper = true;
}
</script>
Hope this will helps.
Reference :
Comments
Post a Comment