Ulrtawebgrid which has pagenation displayes only record on that page in excel sheet ..... i want to enteire data in grid to be exported.........
please help me out in this
Thanks in advance,
Sharath Vasu
Turn paging off, rebind the grid, and then perform the Export() method of your exporter. WebGridExcelExporter only exports the rows that are actually in the grid, and WebGrid only keeps rows for the current page it's displaying.
So long as you're using the default "send-file-to-browser" functionality of WebGridExcelExporter, and you're not saving anything specific in Session state when you're doing the export, you shouldn't have to bother re-binding the grid back to the original page you had selected; your Excel file will take over any HTML response that would tell the grid on the client that anything changed. If you are doing anything that would persist this information, however, you may need to track what page you were on, reset this after exporting, and re-bind your grid again.
below is the bit of code i have written inside export to excel button click......... still the same problem exists
UltraWebGrid1.DataSource = ds;
UltraWebGrid1.DataBind();
UltraWebGridExcelExporter1.Export(UltraWebGrid1);
UltraWebGrid1.DisplayLayout.Pager.AllowPaging = true;
Thanks,
There's another cause that I may have missed: do you have the grid's AJAX functionality turned on? If so, turn it off, because it also restricts the number of rows actually put into the grid.
UltraWebGrid1.DisplayLayout.LoadOnDemand = LoadOnDemand.NotSet; // Do this before you call DataBind()