Hi,
I have a problem that when i use the staticheaders option of the RadGrid, my export does not work. Only the first time.
The RadGrid exists in an updatepanel. I have registered the exelbutton as postbackcontrol to the scriptmanager.
In the ItemCreated eventhandler of the radgrid
So when usestaticheaders = false, export works, when true not !
There is an old post where you mentioned the usestaticheaders should be set to false when exporting, is this still relevant or not?
The post:
http://www.telerik.com/community/forums/aspnet-ajax/grid/export-grid-within-updatepanel.aspx
I also tried it adding following function, but in our application it does not work, only the first option, (register as portbackbutton)
Thanks in advance
Rudy
I have a problem that when i use the staticheaders option of the RadGrid, my export does not work. Only the first time.
The RadGrid exists in an updatepanel. I have registered the exelbutton as postbackcontrol to the scriptmanager.
In the ItemCreated eventhandler of the radgrid
System.Web.UI.Control ctrl = e.Item.FindControl("ExportToExcelButton");System.Web.UI.ScriptManager.GetCurrent(grid.Page).RegisterPostBackControl(ctrl);So when usestaticheaders = false, export works, when true not !
There is an old post where you mentioned the usestaticheaders should be set to false when exporting, is this still relevant or not?
The post:
http://www.telerik.com/community/forums/aspnet-ajax/grid/export-grid-within-updatepanel.aspx
I also tried it adding following function, but in our application it does not work, only the first option, (register as portbackbutton)
Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initializeRequestHandler);function initializeRequestHandler(sender, args){ if (args.get_postBackElement().id.indexOf("ExportToExcelButton") != -1) { args.set_cancel(true); sender._form["__EVENTTARGET"].value = args.get_postBackElement().id.replace(/\_/g, "$"); sender._form["__EVENTARGUMENT"].value = ""; sender._form.submit() }}Thanks in advance
Rudy