示例#1
0
        protected override void Render(HtmlTextWriter writer)
        {
            if (!this.DesignMode)
            {
                sm.RegisterScriptDescriptors(this);
            }
            base.Render(writer);
            this.Style.Add("width", this.Width.ToString());
            this.Style.Add("height", this.Height.ToString());
            if (this.Pager.Count > 0)
            {
                if (this.TypePaging == Constant.TypePaging.Client)
                {
                    return;
                }
                Pager  _page          = this.Pager[0];
                string onClientPaging = _page.OnPaging;

                writer.Write("<div id=\"" + this.ClientID + "_toolbar\"  class=\"toolbar\" style=\"width: " + this.Width + "; height: 30px; \">");
                writer.Write("<div class=\"toolbar-inside\">");
                writer.Write("<div class=\"class-view\">");
                writer.Write("<div id=\"" + this.ClientID + "_first\" class=\"page fist-page-disable\"></div></div>");
                writer.Write("<div class=\"class-view\">");
                writer.Write("<div id=\"" + this.ClientID + "_prev\" class=\"page page-prev-disabled\"></div></div>");
                writer.Write(" <div class=\"class-view\" style=\"width: 50px; margin-top: 0px !important;\"> ");
                writer.Write(" <input type=\"text\" style=\"width: 45px\" id=\"" + this.ClientID + "_display\" value=\"1\"  /></div>");
                writer.Write("<div class=\"class-view\" style=\"width: 5px !important; font-size: larger; margin-left:5px;\">/</div>");
                writer.Write("<div class=\"class-view\" style=\"width: 25px !important; font-size: larger; margin-left:5px;\">");
                writer.Write("<p id=\"" + this.ClientID + "_total\">" + Math.Round(LibConvert.ObjectToDouble(RowCount) / LibConvert.ObjectToDouble(_page.PageSize) + 0.5).ToString() + "</p></div>");
                writer.Write("<div class=\"class-view\">");
                writer.Write("<div id=\"" + this.ClientID + "_next\" class=\"page page-next\"></div></div>");
                writer.Write("<div class=\"class-view\">");
                writer.Write("<div id=\"" + this.ClientID + "_last\" class=\"page page-last\"></div></div>");
                writer.Write("</div>");
                writer.Write("</div>");
            }
        }