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
45
Export entire grid to Excel
posted

Is it possible to export to excel the entire grid in case there is paging?  How?

Varpi

Parents
No Data
Reply
  • 20
    posted

    We need to set the following property for the grid

    Browser = XMLLoadonDemand = XMLAnd we should bind the datasource in the “ultrawebgrid_initilazingdatasource” event

    and on the button click write the following code

     

    Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click

    UltraWebGrid2.DisplayLayout.Pager.AllowPaging = False

    UltraWebGrid2.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.NotSet

    UltraWebGrid2.DataBind()

    UltraWebGridExcelExporter1.DownloadName = "EmployeesAll.xls"

    UltraWebGridExcelExporter1.Export(UltraWebGrid2)

    UltraWebGrid2.DisplayLayout.Pager.AllowPaging = True

    UltraWebGrid2.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.Xml

    ' Me.UltraWebGridExcelExporter1.Export(Me.UltraWebGrid2)

    End Sub

Children