Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Need Help With Exporting Ultrawebgrid to Excel
posted

My application uses UltraWebGridExcelExporter to export the ultrawebgrid to excel.

But I have to export first 500 records from the data source where as the ulrawebgrid just displays first 25 records due to pagination.

So only 25 records are exported by UltraWebGridExcelExporter to excel.

Is there any way to export 500 records to excel using UltraWebGridExcelExporter or is there any other approach to export to excel?

Your help is greatly appreciated.

 

Thanks,

Praba

 

Parents
No Data
Reply
  • 103
    posted

    Hi,

    You can do something like below code in your download click event

    Here is sample code for your reference

     protected void  downloadLinkButton_Click(object sender, System.EventArgs e)
            {
                this.locationsUltraWebGrid.DisplayLayout.Pager.AllowPaging = false;
                this.locationsUltraWebGrid.DataBind();

                //Export the data   
                this.UltraWebGridExcelExporter1.Export(locationsUltraWebGrid);
                this.UltraWebGridExcelExporter1.DownloadName = "Locations";

                //Turn it back on
                this.locationsUltraWebGrid.DisplayLayout.Pager.AllowPaging = true;
                this.locationsUltraWebGrid.DataBind();

            }

    Hope this helps

     

Children