We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Pressing pdf export is not generating any event

Thread ID:

Created:

Updated:

Platform:

Replies:

129449 Mar 18,2017 03:15 PM Mar 23,2017 04:46 AM ASP.NET Web Forms 5
loading
Tags: Grid
Salabat Khan
Asked On March 18, 2017 03:15 PM

Hi,

Pressing pdf export is not generating any event for my gridview. Can you please send a very small demo of how to achieve this. The sample provided is perfectly working but in my case the dialogue is not appearing.

Thanks

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 20, 2017 09:19 AM

Hi Salabat, 

Thanks for contacting Syncfusion support. 

Query 1: Pressing pdf export is not generating any event for my gridview. 
 
We have analyzed your query and we suspect that you need an event while press the export in Grid.  
 
So, we suggest you to use the toolbarClick event of ejGrid. Trigger the toolbarClick event while pressing the export toolbar items like excelExport, wordExport, pdfExport in Grid control. 
 
Refer the below code example. 
 
 
<ej:Grid ID="FlatGrid" runat="server"  AllowPaging="True"> 
 
            <ToolbarSettings ShowToolbar="true" ToolbarItems="excelExport,wordExport,pdfExport"></ToolbarSettings> 
 
            <ClientSideEvents ToolbarClick="toolbarClickevent" /> 
            
            <Columns> 
                 
                --------------------- 
 
           </Columns> 
                      
</ej:Grid> 
 
 
If you need the events in server side itself then you can use server events for the exporting in ejGrid control.  
 
The server event for exporting is triggered when a request to export the Grid.   
 
Refer the below code  example. 
 
 
<ej:Grid ID="FlatGrid" runat="server" IsResponsive="true"  
 
OnServerWordExporting="FlatGrid_ServerWordExporting"  /*Server event for word exporting*/ 
 
OnServerPdfExporting="FlatGrid_ServerPdfExporting" /*Server event for pdf exporting*/ 
 
 
OnServerExcelExporting="FlatGrid_ServerExcelExporting" /*Server event for excel exporting*/ 
 
 
AllowPaging="True"> 
 
            <ToolbarSettings ShowToolbar="true" ToolbarItems="excelExport,wordExport,pdfExport"></ToolbarSettings> 
 
                        
            <Columns> 
                 
                 -------------------- 
 
            </Columns> 
                      
       </ej:Grid> 
 
 
 
In addition that, the OnServerPdfQueryCellInfo event is triggered every time data is written to the cell of the PdfGrid table and also this event is triggered every time as that of the cell written to the grid table. 
 
 
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="true"  
 
OnServerPdfQueryCellInfo="OrdersGrid_ServerPdfQueryCellInfo"  
 
OnServerPdfExporting="OrdersGrid_ServerPdfExporting"> 
 
 
 
  ---------------------- 
 
</ej:Grid> 
 
 
 
Refer the below online sample. 
 
 
Refer the help documentation. 
 
 
 
 
 
 
Query 2: The sample provided is perfectly working but in my case the dialogue is not appearing. 
 
We are unclear about your query. So please elaborate your query, it will be helpful for us to analyze about your query and update you the response as early as possible. 
 
Regards, 
Thavasianand S.

Salabat Khan
Replied On March 20, 2017 01:29 PM

Hi, Nice to see your detailed reply. In the second part of my question, I wanted to say that the dialogue box which asks for file name (when exporting) is not appearing.

Anyhow, I am interested in server side export event. I am attaching the project sample in which I am unable to receive the server side call to function when any of the export buttons on toolbar is pressed.

Regards

Attachment: SyncfusionASPNETWebApplication1_c4a45819.rar

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 22, 2017 02:03 PM

Hi Salabat, 
 
Query 1:  I wanted to say that the dialogue box which asks for file name (when exporting) is not appearing. 
 
Please ensure your browser download settings for prompt dialog opening while downloading. But we have called for the default prompt type while exporting the Grid. So, change your download settings for the dialog prompt window while downloading a file. 
 
Query 2: I am unable to receive the server side call to function when any of the export buttons on toolbar is pressed 
 
We have checked your sample and in that you are not added ScriptManager control in the Site.Master page. 
 
Refer the below code example. 
 
 
<body> 
   <form runat="server"> 
        <asp:ScriptManager runat="server"> 
             
        </asp:ScriptManager> 
    <div class="page"> 
        <div class="header"> 
            <div class="title"> 
 
       ------------------- 
 
</form> 
</body> 
 
 
We have changed the sample according to the solution and it can be downloadable from the below location. 
 
 
We have already created a knowledge base for the above mentioned query. 

So, please refer the below knowledge base link. 

 
Regards, 
Thavasianand S. 


Salabat Khan
Replied On March 22, 2017 02:29 PM

Thank you. It is now working..

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 23, 2017 04:46 AM

Hi Salabat, 

We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.  

Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;