Hi,
I am using a webGrid control with paging option. I am trying to export the webGrid to an Excel file.
Since it doesnt export all pages to excel , I am trying to turn off the paging option in the export button event handler and binding the data to the webGrid again. This is not working. let me know if you guys have any idea.
Thanks in advance.
Whoops. Never mind. I had to change this:
Me.UltraWebGrid1.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.Automatic
TO:
Me.UltraWebGrid1.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.NotSet
I tried this:________________________________________
HideColumns()
Me.UltraWebGridExcelExporter1.DownloadName = "email"
ShowColumns()
Me.UltraWebGrid1.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.Xml
End Sub
___________________which works fine, but if I apply a filter and then export, I get the filtered set twice.
to say it another way, if I filter and the grid is showing only 5 records, and then I export, i get 10 records in the excel file.
Any ideas?
http://forums.infragistics.com/forums/p/2865/16661.aspx#16661
http://forums.infragistics.com/search/SearchResults.aspx?q=export+page&s=192
You need to rebind to the grid with paging turned off and then export, otherwise the grid will only bind and export the current page.