private HtmlGenericControl AddNavLinkButton(Control container, string commandName, string commandArgument, string text, string btnClass, string iconClass) { HtmlGenericControl li = new HtmlGenericControl("li"); container.Controls.Add(li); DeluxePagerLinkButton btn = new DeluxePagerLinkButton(this); li.Controls.Add(btn); btn.CommandName = commandName; btn.CommandArgument = commandArgument; btn.Text = text; if (text.IsNullOrEmpty()) { HtmlGenericControl icon = new HtmlGenericControl("i"); btn.Controls.Add(icon); icon.Attributes["class"] = iconClass; } return(li); }
private void DrawingGotoPaging(HtmlGenericControl container) { HtmlGenericControl group = new HtmlGenericControl("div"); container.Controls.Add(group); group.Attributes["class"] = "input-group"; this._TxtPageCode.CssClass = "form-control"; group.Controls.Add(_TxtPageCode); this._TxtPageCode.Text = (PageIndex + 1).ToString(); this._TxtPageCode.ID = "txtPageCode"; HtmlGenericControl btnGroup = new HtmlGenericControl("span"); group.Controls.Add(btnGroup); btnGroup.Attributes["class"] = "input-group-btn"; this._GotoBtn = new DeluxePagerLinkButton(this); btnGroup.Controls.Add(this._GotoBtn); this._GotoBtn.Text = this.GotoButtonText; this._GotoBtn.CommandName = "Goto"; this._GotoBtn.CausesValidation = false; this._GotoBtn.CssClass = "btn btn-default"; this._GotoBtn.OnClientClick = GetButtonValidationScript(); bool disabled = (this.PageCount == 0 || (this.PageIndex <= this.PageCount && this.PageCount == 1)); group.Attributes["class"] = GetEnabledCssClass(group.Attributes["class"], !disabled); this._TxtPageCode.Enabled = !disabled; this._GotoBtn.Enabled = !disabled; }
private HtmlGenericControl AddNavLinkButton(Control container, string commandName, string commandArgument, string text, string btnClass, string iconClass) { HtmlGenericControl li = new HtmlGenericControl("li"); container.Controls.Add(li); DeluxePagerLinkButton btn = new DeluxePagerLinkButton(this); li.Controls.Add(btn); btn.CommandName = commandName; btn.CommandArgument = commandArgument; btn.Text = text; if (text.IsNullOrEmpty()) { HtmlGenericControl icon = new HtmlGenericControl("i"); btn.Controls.Add(icon); icon.Attributes["class"] = iconClass; } return li; }