zoukankan      html  css  js  c++  java
  • datagrid分页控件的使用&&radiobuttonlist的使用

    datagrid分页控件的使用

    1.         datagrid所在页的html中最上方写

    <%@ Register TagPreFix="WebUserControl" TagName="Pager" Src="inc/PageBar.ascx"%>

    2.         datagridhtml代码后面写入
    <WEBUSERCONTROL:PAGER id="PageBar" onclick="CutPage" Runat="server"></WEBUSERCONTROL:PAGER>

    3.          

    后台使用时:在给datagrid邦定数据时加入
            this.PageBar.RowCount = ds.Tables[0].Rows.Count;

            this.PageBar.PageSize = this.DataGrid1.PageSize;

            this.PageBar.CurrPage = this.DataGrid1.CurrentPageIndex;

    4.             this.PageBar.PageBind();

    再定义这几个函数     

    protected void CutPage(object sender,System.EventArgs e)

            {

                this.DataGrid1.CurrentPageIndex = this.PageBar.CurrPage;

                this.BindBd();

            }

    private void BtCx_Click(object sender, System.EventArgs e)

            {

                this.BindBd();

          }

    这样就完成datagrid的使用了。

    radiobuttonlist的使用

    例如:

    idpxxs

    items为基选项。

    Repeatdirction为排列方向。

    在代码中要加入

    selected =true

    在后台使用时直接用(pxxs.SelectedItem)其SelectedItem属性就能茯得其值

     

     

  • 相关阅读:
    使用正则表达式验证密码长度
    创建字符串
    洛谷P1605 迷宫 深度搜索 模板!
    洛谷P5534 【XR-3】等差数列 耻辱!!!
    搜索字母a或A
    洛谷P1200 [USACO1.1]你的飞碟在这儿Your Ride Is Here
    19新生赛 质数中的质数
    洛谷P1055 ISBN号码
    洛谷P 1427 小鱼的数字游戏
    洛谷p1047 校门外的树
  • 原文地址:https://www.cnblogs.com/abeen/p/235785.html
Copyright © 2011-2022 走看看