This is a migrated thread and some comments may be shown as answers.

Export grid from DotNetNuke Module

2 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marcus
Top achievements
Rank 1
Marcus asked on 22 Nov 2008, 06:54 PM
Hi,

I'm using the RadGrid (Ajax version) in my DNN module module it's all working great. Except, I can't seem to get the export functinlaity working properly. Basically, when I add a scriptmanager to my page I receive "The PageRequestManager cannot be initialized more than once.".

Any ideas? If I remove the script manager then nothing happens when I do this .. RadGrid1.MasterTableView.ExportToExcel();

I've been struggling with this for ages so any help is much appreciated.

Thanks,

Marcus.

2 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 25 Nov 2008, 11:54 AM
Hello Marcus,

Could you please try disabling the partial update of the DNN module and test again the application? Let me know if this problem still persist after this modification.

Greetings,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
johnv
Top achievements
Rank 2
answered on 05 Feb 2009, 10:43 PM
Hey I don't know if this matters as the thread is sort of stale, but here is a real DNN solution I have implemented.

Inside a RadCodeBlock create a script tag and paste the following:
    function OnRequestStart(sender, args) 
    { 
                 
        args.set_enableAjax(true); 
         
        setTimeout(function(){ document.forms[0]["__EVENTTARGET"].value = ""; }, 100); 
     
    } 
     
    function OnResponseEnd(sender, args) 
    { 
         
        args.set_enableAjax(false); 
         
         
    } 

Then add a RadAjaxManager to the page and add your grid instance to the ajax settings. On the client events wire up the OnRequestStart and OnResponseEnd functions above.

I also had to put my export buttons in a RadAjaxPanel and wire up the ClientEvents-OnRequestStart="OnResponseEnd" ClientEvents-OnResponseEnd="OnRequestStart" events. (Yes, I realize they are backwards, but it turns ajax back on again after the button response is finished.)

Everything works perfectly for me now.

Cheers!

John


Tags
Grid
Asked by
Marcus
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
johnv
Top achievements
Rank 2
Share this question
or