Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7915987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:38:28+00:00 2026-06-03T14:38:28+00:00

I am exporting the grid data to the PDF file by using iTextSharp. I

  • 0

I am exporting the grid data to the PDF file by using iTextSharp. I am searching the billno and fetched data is relating on the grid and control( in ext.net). Searching can be in 3 ways:
1. By inserting billno and pressing enter in combo box
2. By inserting billno and click the trigger in combo
3. By Selecting billno from combo
Now after that I click on ToPDF button to export data.
If I perform 2 & 3, its working fine, but when I perform 1 then a window comes with header Request failure, Status text – communication failure. As the Grid data are exported also, but y this window appears that I m nt getting.

My Code is as below
.cs

protected void ToPDF(object sender, EventArgs e)
{
      //Code
}

.aspx

 <ext:ComponentMenuItem ID="ComponentMenuItem1" runat="server">
                                                        <Component>
                                                               <ext:ComboBox ID="cmbSearchBillno" runat="server" 
                                                                    EmptyText="Select Bill No" 
                                                                    ForceSelection="true"   
                                                                    StoreID="BillMasterStore"  
                                                                    DisplayField="Billno" ValueField="BillId">
                                                                    <Triggers>
                                                                        <ext:FieldTrigger Icon="Search" />
                                                                    </Triggers>
                                                                     <Listeners>
                                                                        <SpecialKey Fn="enterKeyPressHandler" />
                                                                    </Listeners>
                                                                    <DirectEvents>
                                                                         <%--<SpecialKey OnEvent="enterKeyPressHandler" ShowWarningOnFailure="false" Timeout="60000" StopEvent="true">
                                                                            <ExtraParams>
                                                                                <ext:Parameter Name="key" Value="e.getKey()" Mode="Raw">
                                                                                </ext:Parameter>
                                                                                <ext:Parameter Name="BillNo" Value="this.getText()"  Mode="Raw"></ext:Parameter>
                                                                            </ExtraParams>
                                                                        </SpecialKey>--%>
                                                                        <Select OnEvent="ChangeBillno">
                                                                            <ExtraParams>
                                                                                <ext:Parameter Name="BillNo" Value="record.id" Mode="Raw"></ext:Parameter>
                                                                            </ExtraParams>
                                                                        </Select>
                                                                        <TriggerClick OnEvent="SearchBillDetails" >
                                                                            <ExtraParams>
                                                                                <ext:Parameter Name="BillNo" Value="this.getText()" Mode="Raw"></ext:Parameter>
                                                                            </ExtraParams>
                                                                        </TriggerClick>
                                                                    </DirectEvents> 

                                                                </ext:ComboBox>
                                                        </Component>                        
                                                    </ext:ComponentMenuItem>

ToPDF button

  <ext:Button ID="btnPdf" runat="server" Text="To PDF" AutoPostBack="true" OnClick="ToPDF"  Icon="PageWhiteAcrobat">
                                        <Listeners>
                                            <Click Fn="saveData" />
                                        </Listeners>
                                     </ext:Button>

Script

<script type="text/javascript">

       var enterKeyPressHandler = function (f, e) {
           if (e.getKey() == e.ENTER) 
           {
                var billno=this.getText();
                Ext.net.DirectMethods.SearchBillno(billno);

                e.stopEvent();
                this.send();
           }
       }


         var saveData = function () {
           GridData.setValue(Ext.encode(GridService.getRowsValues({selectedOnly : false,excludeId:true})));
        };


    </script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:38:31+00:00Added an answer on June 3, 2026 at 2:38 pm

    yeah it will throw error when you search with enter key
    this is because you are using direct method in listener to fill up the grid.
    By looking at your code i can see that u have used direct event Special Key which you have commented before..use that direct event Special Key and it will work

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Exporting some data from mysql to a csv file using FasterCSV. I'd like the
I am exporting data table from php page to pdf I got the page
Summary: exporting pixel data from NSOpenGLView to some file formats gives incorrect colours I
I'm using a DevExpress-GridControl with built-in sorting. When exporting the data to a Report
When exporting a project as a Runnable JAR file using Eclipse, there are three
I have implement functionality for exporting data from gridview to excel sheet in .net
I want to create a user control, which can be bound to some data
I use Devexpress ASP.NET component. My question is; Can i use Devexpress Exporting Code
I am using jqGrid control in an ASP.NET application. Export to Excel feature is
When exporting a Visual Studio project to a Template (File/Export Template...) I get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.