更改页面索引时,GridView不可见 [英] gridview got invisible when change the page index

查看:82
本文介绍了更改页面索引时,GridView不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试更改页面时,gridview不可见(在我的网页中,gridview位于弹出扩展器中),我再次想按显示"按钮查看特定页面
再一次,如果我按下下一个索引,则gridview再次变得不可见

代码如下

When i tried to change the page,gridview got invisible(In my webpage gridview is in the popup extender) and i again want to press the ''show'' button for viewing the particular page
And again if i press the next index,the gridview again get invisible

The code follows

ViewState["function"] = "showall";

        grdvHostelRoomDetails.Visible = false;
        
        lblMessage.Visible = false;
        commonObject.connection.Open();
        commonObject.command1 = new SqlCommand();
        commonObject.dTable = new DataTable();
        commonObject.command1.Parameters.AddWithValue("@CampusID", Convert.ToInt32(Session["CampusID"].ToString()));
        commonObject.dTable = commonObject.ExecuteProcedureSelect("SP_HostelRoomSetting_Select");
        
        grdvHostelRoomDetails.DataSource = commonObject.dTable;
        grdvHostelRoomDetails.DataBind();
        grdvHostelRoomDetails.Visible = true;
       
        commonObject.connection.Close();
        mpereader.Show();

推荐答案

请在放置网格视图的位置发布您的代码.同时检查是否已将gridview的可见性设置为"False".
Please post your code where your gridview is placed. Meanwhile check if you have set the visibility of gridview to "False".


在页面索引事件上添加
grdvHostelRoomDetails.Visible = true;
on page index event add
grdvHostelRoomDetails.Visible = true;


这篇关于更改页面索引时,GridView不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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