Hi,
I have a gridview with load-on-demand is enabled. When the grid is exported with excel exporter, only the rows that were visible during the initial load are exported. Is this a limitation with loading?
Yes, this is a limitation of WebGridExcelExporter. It will only export those rows that exist in the grid, and when you have the grid's AJAX functionality turned on, it only has the first set of rows available. The same occurs with the grid's paging functionality; the grid only has the current page's data available.
To get around this, turn off the grid's AJAX and paging features, call DataBind() on the grid, and then export. As long as you're not using any of the "custom" download modes of the WebGridExcelExporter, you don't even have to reset these values to their previous values - your Excel file will be the response sent to the client, so the client never finds out about the changes you made on the server.