.net - How to only bind gridview after a button click? -


I have a grid view, which is using the ObjectData source, this is the source.

Is it possible only to bind the gridview, after clicking on a button, and it should initially be blank ... but continue to use ObjectDataSource?

This is possible.

Register an click on the button and click on the button to handle the binding of the GridView in the handler.

If you want GridView "blank" initially, bind it to an empty type of IEnumerable which you are compelling, it will not be included in any rows, but The headers will be here.

Comments