Recently I faced an issue while developing "Export to Excel" functionality for Telerik grid in Webpart for SharePoint 2010. Export to excel was not working once the user has clicked the button. After some googling, I found that by using following JavaScript snippet in the Webpart or Page, this issue can be resolved and it worked for me :
<script type="text/javascript" language="javascript">
//sharepoint postback to work after clicking on telerik export
if (typeof (_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) {
_spBodyOnLoadFunctionNames.push("supressSubmitWraper");
}
function supressSubmitWraper() {
_spSuppressFormOnSubmitWrapper = true;
}
</script>
Hope it can help someone!!
<script type="text/javascript" language="javascript">
//sharepoint postback to work after clicking on telerik export
if (typeof (_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) {
_spBodyOnLoadFunctionNames.push("supressSubmitWraper");
}
function supressSubmitWraper() {
_spSuppressFormOnSubmitWrapper = true;
}
</script>
Hope it can help someone!!
Hi,
ReplyDeleteIt helped me. Thanks for the info.
Great , Good , it is working fine.
Delete