如何在ajax选项卡容器的选项卡面板中填充gridview [英] How to Fill a gridview inside a tab panel in ajax tab container

查看:96
本文介绍了如何在ajax选项卡容器的选项卡面板中填充gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好编码员,

我在我的应用程序中使用ajax选项卡容器。我希望绑定不同的网格视图,以便在选项卡的索引发生更改时填充。在页面加载时我想填充一个网格和单击第二个选项卡时,我想填充第二个选项卡。我已将自动回发属性设置为true并已在受保护的子上编写代码TabContainer1_ActiveTabChanged(ByVal sender As Object,ByVal e As System.EventArgs)Handles TabContainer1.ActiveTabChanged但它根本不会发射。我怎么做到???

问候,

Gourav Sharma

Hi coders,
I am using ajax tab container in my application.I want to bind different gridviews to get populated whenever the index of the tab is changed.On page load i want to populate one grid and when 2nd tab is clicked i want to populate the second one.I have set the auto post back property true and have written the code on Protected Sub TabContainer1_ActiveTabChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabContainer1.ActiveTabChanged but it just doesnot fire at all.How do i achieve that???
Regards,
Gourav Sharma

推荐答案

试试这个



最初

Try this

Initially
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"
        Height="367px" Width="1000px">










protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
          if(TabContainer1.ActiveTabIndex==0)
           {

//Populate GridView1
           }
          else if(TabContainer1.ActiveTabIndex==1)
           {

//poputale Grid2
           }
       }
   }


这篇关于如何在ajax选项卡容器的选项卡面板中填充gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆