none
Leaf 数据控件 RRS feed

答案

  • View

    <form id="form1" runat="server">
        <div id="div" runat="server" style="margin-left:5px;margin-right:5px;margin-bottom:400px;"></div>
        <div>
            <cc2:Leaf ID="Leaf1" runat="server" BackColor="White" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial" ForeColor="Black" Font-Size="Small" />
        </div>
        <hr />
        <div style="text-align:center;"><span style="font-family:Arial;font-size:small;">Leaf</span></div>
        </form>

    2011年4月9日 19:04

全部回复

  • Leaf数据绑定与分页

    protected void Page_Load(object sender, EventArgs e)
        {
            List<string> list = null;
            if (ViewState["list"] == null)
            {
                list = new List<string>();
                int i = 1;
                while (i <= 1000)
                {
                    list.Add(i.ToString());
                    i++;
                }
                ViewState["list"] = list;
            }
            list =(List<string>)ViewState["list"];
            Leaf1.MaxCount = list.Count;
            Leaf1.MaxRow = 7;
            Leaf1.DisplayPageCount = 2;
            List<string> pagelist = Leaf.PageHelp<string>.GetPageList(Leaf1.CurrentPage, list, Leaf1.MaxRow);
            foreach (string str in pagelist)
            {
                Label lbl = new Label();
                lbl.Text = str + "<br/>";
                div.Controls.Add(lbl);
            }
        }

    • 已建议为答案 胡 超 2011年4月11日 16:38
    2011年4月9日 19:01
  • View

    <form id="form1" runat="server">
        <div id="div" runat="server" style="margin-left:5px;margin-right:5px;margin-bottom:400px;"></div>
        <div>
            <cc2:Leaf ID="Leaf1" runat="server" BackColor="White" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial" ForeColor="Black" Font-Size="Small" />
        </div>
        <hr />
        <div style="text-align:center;"><span style="font-family:Arial;font-size:small;">Leaf</span></div>
        </form>

    2011年4月9日 19:04