public override void CopyFrom(Style s) { if ((s != null) && !s.IsEmpty) { base.CopyFrom(s); if (s is DataGridPagerStyle) { DataGridPagerStyle style = (DataGridPagerStyle)s; if (style.IsSet(0x80000)) { this.Mode = style.Mode; } if (style.IsSet(0x100000)) { this.NextPageText = style.NextPageText; } if (style.IsSet(0x200000)) { this.PrevPageText = style.PrevPageText; } if (style.IsSet(0x400000)) { this.PageButtonCount = style.PageButtonCount; } if (style.IsSet(0x800000)) { this.Position = style.Position; } if (style.IsSet(0x1000000)) { this.Visible = style.Visible; } } } }
public Pager(PagedDataSource pagedDataSource, int columnSpan, DataGridPagerStyle pagerStyle) : this(pagedDataSource, columnSpan) { NextPageText = pagerStyle.NextPageText; PrevPageText = pagerStyle.PrevPageText; CssClass = pagerStyle.CssClass; HorizontalAlign = pagerStyle.HorizontalAlign; }
/// <include file='doc\DataGridPagerStyle.uex' path='docs/doc[@for="DataGridPagerStyle.MergeWith"]/*' /> /// <devdoc> /// <para>Merges the data grid pager style from the specified <see cref='System.Web.UI.WebControls.Style'/>.</para> /// </devdoc> public override void MergeWith(Style s) { if (s != null && !s.IsEmpty) { if (IsEmpty) { // merge into an empty style is equivalent to a copy, which // is more efficient CopyFrom(s); return; } base.MergeWith(s); if (s is DataGridPagerStyle) { DataGridPagerStyle ps = (DataGridPagerStyle)s; if (ps.IsSet(PROP_MODE) && !this.IsSet(PROP_MODE)) { this.Mode = ps.Mode; } if (ps.IsSet(PROP_NEXTPAGETEXT) && !this.IsSet(PROP_NEXTPAGETEXT)) { this.NextPageText = ps.NextPageText; } if (ps.IsSet(PROP_PREVPAGETEXT) && !this.IsSet(PROP_PREVPAGETEXT)) { this.PrevPageText = ps.PrevPageText; } if (ps.IsSet(PROP_PAGEBUTTONCOUNT) && !this.IsSet(PROP_PAGEBUTTONCOUNT)) { this.PageButtonCount = ps.PageButtonCount; } if (ps.IsSet(PROP_POSITION) && !this.IsSet(PROP_POSITION)) { this.Position = ps.Position; } if (ps.IsSet(PROP_VISIBLE) && !this.IsSet(PROP_VISIBLE)) { this.Visible = ps.Visible; } } } }
/// <include file='doc\DataGridPagerStyle.uex' path='docs/doc[@for="DataGridPagerStyle.CopyFrom"]/*' /> /// <devdoc> /// <para>Copies the data grid pager style from the specified <see cref='System.Web.UI.WebControls.Style'/>.</para> /// </devdoc> public override void CopyFrom(Style s) { if (s != null && !s.IsEmpty) { base.CopyFrom(s); if (s is DataGridPagerStyle) { DataGridPagerStyle ps = (DataGridPagerStyle)s; if (ps.IsSet(PROP_MODE)) { this.Mode = ps.Mode; } if (ps.IsSet(PROP_NEXTPAGETEXT)) { this.NextPageText = ps.NextPageText; } if (ps.IsSet(PROP_PREVPAGETEXT)) { this.PrevPageText = ps.PrevPageText; } if (ps.IsSet(PROP_PAGEBUTTONCOUNT)) { this.PageButtonCount = ps.PageButtonCount; } if (ps.IsSet(PROP_POSITION)) { this.Position = ps.Position; } if (ps.IsSet(PROP_VISIBLE)) { this.Visible = ps.Visible; } } } }
public void FixtureSetUp () { pager_style = new DataGrid ().PagerStyle; }