I have a page where I don't need a visual grid, but just want to programmatically create a RadGrid so I can use its export to ExcelML function. I am getting "RadGrid must be databound before exporting." I am calling DataBind(), so I really must be missing something simple here. Any suggestions?
Instead of creating the Grid in the Export button click event. Create the Grid in the PageInit handler. Set the visibility of the Grid to true in the button click event.Also bind the Grid in the NeedDataSourceEvent and see whether you are getting this error on exporting?
Go through the following help link to get more details on Programmatic Creation. Programmatic creation
Yeah, I was afraid that would be the response on this one. I don't understand why it has to be part of the page lifecycle, and why it can't be used independently like you could with most other controls. Thanks for the response anyway.