在gridview分页不适用于第一次单击..pls帮助我 [英] paging in gridview not working for first click ..pls help me

查看:46
本文介绍了在gridview分页不适用于第一次单击..pls帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一次单击时无法在gridview中分页..pls帮助我


在此先感谢

paging in gridview not working for first click ..pls help me


thanks in advance

推荐答案

> onpageindexchanging ="GridView1_PageIndexChanging"

AllowPaging="True"

在下面编写代码页索引更改事件

>onpageindexchanging="GridView1_PageIndexChanging"

AllowPaging="True"

write below code page index changing event

GridView1.PageIndex = e.NewPageIndex;
        string serchtext = "ClientName like '" + CName + "%' and WorkLocation like '" + Loc + "%' and JobTitle like '" + title + "%'";

        SqlCommand cmdv = new SqlCommand("Select JobId,ClientName,JobTitle,JobType,SkillsRequired,Experience,NoofPositions,Status,WorkLocation from JobsInformation", Con);
        SqlDataAdapter da = new SqlDataAdapter(cmdv);
        DataSet ds = new DataSet();
        da.Fill(ds);
        Con.Close();
        DataView dv = null;
        dv = new DataView(ds.Tables[0]);
        dv.RowFilter = serchtext;
        GridView1.DataSource = ds;
        GridView1.DataBind();


请参阅:

http://forums.asp.net/t/1068982.aspx/1?Gridview + Paging + not + working + on + first + click [
Refer this:

http://forums.asp.net/t/1068982.aspx/1?Gridview+Paging+not+working+on+first+click[^]


^ ]



这是实现的gridview的许多功能,请检查此....
分页和自定义分页代码也可通过示例获取.
http://www.dotnetspider.com/resources/Index.aspx?CategoryId=518&PageNumber=1[^]



Here is lot of functionality of the gridview implemented check this ....
Paging and custom paging code is also available with example .


这篇关于在gridview分页不适用于第一次单击..pls帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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