Hi There,
I have a radgrid that is placed on the usercontrol. Grid is under RadAjaxManagerProxy.
I am not able to use the inbuilt Export to excel property of the grid
Although I have searched for the same and found that its because of asynchronous post back,
I have also written client side event(OnRequestStart) for the radajaxmanager on pageload event of the usercontrol, but not able to use the export inbuilt functionality.
Kindly suggest how to achieve this.
RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
if (manager != null)
{
manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager_AjaxRequest);
manager.ClientEvents.OnRequestStart = "onAJAXResponseStart";
manager.ClientEvents.OnResponseEnd = "onAJAXResponseEnd";
}
function onAJAXResponseStart(sender, args) {
if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
args.set_enableAjax(false);
}
else {
args.set_enableAjax(true);
}
}
Thanks
Saurabh
I have a radgrid that is placed on the usercontrol. Grid is under RadAjaxManagerProxy.
I am not able to use the inbuilt Export to excel property of the grid
Although I have searched for the same and found that its because of asynchronous post back,
I have also written client side event(OnRequestStart) for the radajaxmanager on pageload event of the usercontrol, but not able to use the export inbuilt functionality.
Kindly suggest how to achieve this.
RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
if (manager != null)
{
manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager_AjaxRequest);
manager.ClientEvents.OnRequestStart = "onAJAXResponseStart";
manager.ClientEvents.OnResponseEnd = "onAJAXResponseEnd";
}
function onAJAXResponseStart(sender, args) {
if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
args.set_enableAjax(false);
}
else {
args.set_enableAjax(true);
}
}
Thanks
Saurabh