开发者

How to only bind gridview after a button click?

I have a grid view, that is using ObjectDataSource i开发者_StackOverflows it's source.

is it possible to only bind the gridview, after i click a button, and have it initially be blank...but keep using ObjectDataSource?


It is possible.

Register an Click event on the button and handle the binding of the GridView in the handler for the button click.

If you want the GridView "blank" initially, bind it to an empty IEnumerable of the type you're binding to. It wont contain any rows, but the header will be there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜