Hi,
I am tring to create a button outside the RadGrid that will export the grid data.
I am using RadAjaxManagerProxy and added
on the client side I've
and the following script code in the head section
The problem is that inlike export from the grid button , this way
Is there a way to overcome this?
I am tring to create a button outside the RadGrid that will export the grid data.
I am using RadAjaxManagerProxy and added
protected void Page_Load(object sender, EventArgs e) { RadAjaxManager.GetCurrent(this.Page).ClientEvents.OnRequestStart = "onRequestStart"; if (!IsPostBack) this.DataBind(); }<telerik:RadButton runat="server" ID="export" OnClientClicked="ExportGrid" /><script type="text/javascript"> function ExportGrid(sender, args) { var masterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView(); masterTable.exportToExcel(); } function onRequestStart(sender, args) { alert(args.get_eventTarget()); if (args.get_eventTarget().indexOf("btnExport") >= 0) args.set_enableAjax(false); }</script>The problem is that inlike export from the grid button , this way
args.get_eventTarget() is always "ctl00$ContentPlaceHolder1$RadGrid1" and there is no indication if this is export or other action ( I send the insert command using custom button as well) do I can't disable the ajax .Is there a way to overcome this?