开发者

Gridviews in TabControl losing binding on ActiveTabChanged

开发者 https://www.devze.com 2023-02-24 11:27 出处:网络
I have a ajax tab control with 7 tabs and a gridview in each tab. I have it set to autopostback and fill each gridview when that tab is selected. This all works fine. What I would like to be able to d

I have a ajax tab control with 7 tabs and a gridview in each tab. I have it set to autopostback and fill each gridview when that tab is selected. This all works fine. What I would like to be able to do is not fill a gridview if it has already been filled once, but each time I switch tabs the gridviews lose their binding and HAVE t开发者_开发百科o be bound to their datasource again. Any ideas?


you need to bind all your grid of every tab in page load event of page in side

if(!IsPostback)
{
   Bindgrid();
   Bindgrid2();
   ....
}
0

精彩评论

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

关注公众号