protected override void OnInit(EventArgs e) { base.OnInit(e); var nppf = new NextPreviousPagerField(); nppf.ShowNextPageButton = false; nppf.ShowLastPageButton = false; nppf.ShowFirstPageButton = false; nppf.ShowPreviousPageButton = true; Fields.Add(nppf); var npf = new NumericPagerField(); npf.ButtonCount = 10; npf.ButtonType = ButtonType.Link; Fields.Add(npf); nppf = new NextPreviousPagerField(); nppf.ShowNextPageButton = true; nppf.ShowLastPageButton = false; nppf.ShowFirstPageButton = false; nppf.ShowPreviousPageButton = false; Fields.Add(nppf); }
private void ResetPager() { try { CommandEventArgs commandEventArgs = new CommandEventArgs("0", ""); NumericPagerField numericPagerField = dpProducts.Fields[0] as NumericPagerField; if (numericPagerField != null) { numericPagerField.HandleEvent(commandEventArgs); } } catch (Exception ex) { string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "ResetPager"); lblErr.Text = strErrCode; } }
public override bool Equals(object o) { NumericPagerField field = o as NumericPagerField; if (field != null) { if (String.Equals(field.ButtonCount, this.ButtonCount) && field.ButtonType == this.ButtonType && String.Equals(field.CurrentPageLabelCssClass, this.CurrentPageLabelCssClass) && String.Equals(field.NextPageImageUrl, this.NextPageImageUrl) && String.Equals(field.NextPageText, this.NextPageText) && String.Equals(field.NextPreviousButtonCssClass, this.NextPreviousButtonCssClass) && String.Equals(field.NumericButtonCssClass, this.NumericButtonCssClass) && String.Equals(field.PreviousPageImageUrl, this.PreviousPageImageUrl) && String.Equals(field.PreviousPageText, this.PreviousPageText)) { return(true); } } return(false); }
public override bool Equals(object o) { NumericPagerField field = o as NumericPagerField; return((field != null) && object.Equals(field.ButtonCount, this.ButtonCount)); }