public MxDataGridStatusEventArgs(MxDataGridUpdateEventArgs updateEventArgs, int affectedRecords) { this.item = updateEventArgs.Item; this.commandSource = updateEventArgs.CommandSource; this.affectedRecords = affectedRecords; }
public MxDataGridStatusEventArgs(MxDataGridItem item, object commandSource, int affectedRecords) { this.item = item; this.commandSource = commandSource; this.affectedRecords = affectedRecords; }
public MxDataGridUpdateEventArgs(MxDataGridItem item, object commandSource, bool cancel) : base(cancel) { this.item = item; this.commandSource = commandSource; }
public MxDataGridStatusEventArgs(MxDataGridCancelEventArgs cancelEventArgs, int affectedRecords) { this.item = cancelEventArgs.Item; this.commandSource = cancelEventArgs.CommandSource; this.affectedRecords = affectedRecords; }
public MxDataGridUpdateEventArgs(MxDataGridCommandEventArgs commandEventArgs, bool cancel) : base(cancel) { this.item = commandEventArgs.Item; this.commandSource = commandEventArgs.CommandSource; }
public MxDataGridItemEventArgs(MxDataGridItem item) { this.item = item; }
public MxDataGridCommandEventArgs(MxDataGridItem item, object commandSource, CommandEventArgs originalArgs) : base(originalArgs) { this.item = item; this.commandSource = commandSource; }
protected virtual void InitializePager(MxDataGridItem item, int fieldSpan, PagedDataSource pagedDataSource) { TableCell cell = new TableCell(); cell.ColumnSpan = fieldSpan; MxDataGridPagerStyle pagerStyle = this.PagerStyle; if (pagerStyle.Mode == PagerMode.NextPrev) { if (!pagedDataSource.IsFirstPage) { LinkButton child = new MxDataGridLinkButton(); child.Text = pagerStyle.PrevPageText; child.CommandName = "Page"; child.CommandArgument = "Prev"; child.CausesValidation = false; cell.Controls.Add(child); } else { Label label = new Label(); label.Text = pagerStyle.PrevPageText; cell.Controls.Add(label); } cell.Controls.Add(new LiteralControl(" ")); if (!pagedDataSource.IsLastPage) { LinkButton button2 = new MxDataGridLinkButton(); button2.Text = pagerStyle.NextPageText; button2.CommandName = "Page"; button2.CommandArgument = "Next"; button2.CausesValidation = false; cell.Controls.Add(button2); } else { Label label2 = new Label(); label2.Text = pagerStyle.NextPageText; cell.Controls.Add(label2); } } else { LinkButton button3; int pageCount = pagedDataSource.PageCount; int num2 = pagedDataSource.CurrentPageIndex + 1; int pageButtonCount = pagerStyle.PageButtonCount; int num4 = pageButtonCount; if (pageCount < num4) { num4 = pageCount; } int num5 = 1; int num6 = num4; if (num2 > num6) { int num7 = pagedDataSource.CurrentPageIndex / pageButtonCount; num5 = (num7 * pageButtonCount) + 1; num6 = (num5 + pageButtonCount) - 1; if (num6 > pageCount) { num6 = pageCount; } if (((num6 - num5) + 1) < pageButtonCount) { num5 = Math.Max(1, (num6 - pageButtonCount) + 1); } } if (num5 != 1) { button3 = new MxDataGridLinkButton(); button3.Text = "..."; button3.CommandName = "Page"; int num9 = num5 - 1; button3.CommandArgument = num9.ToString(NumberFormatInfo.InvariantInfo); button3.CausesValidation = false; cell.Controls.Add(button3); cell.Controls.Add(new LiteralControl(" ")); } for (int i = num5; i <= num6; i++) { string str = i.ToString(NumberFormatInfo.InvariantInfo); if (i == num2) { Label label3 = new Label(); label3.Text = str; cell.Controls.Add(label3); } else { button3 = new MxDataGridLinkButton(); button3.Text = str; button3.CommandName = "Page"; button3.CommandArgument = str; button3.CausesValidation = false; cell.Controls.Add(button3); } if (i < num6) { cell.Controls.Add(new LiteralControl(" ")); } } if (pageCount > num6) { cell.Controls.Add(new LiteralControl(" ")); button3 = new MxDataGridLinkButton(); button3.Text = "..."; button3.CommandName = "Page"; button3.CommandArgument = (num6 + 1).ToString(NumberFormatInfo.InvariantInfo); button3.CausesValidation = false; cell.Controls.Add(button3); } } item.Cells.Add(cell); }
protected virtual void InitializeItem(MxDataGridItem item, MxDataGridField[] fields) { TableCellCollection cells = item.Cells; for (int i = 0; i < fields.Length; i++) { TableCell cell = new TableCell(); fields[i].InitializeCell(cell, i, item.ItemType); cells.Add(cell); } }