///<summary> /// GridColumn ///</summary> public GridColumn() { SetState(Cs.AllowEdit, true); SetState(Cs.MarkRowDirtyOnCellValueChange, true); _SelectedCells = new SelectedElements(); }
/// <summary> /// Handles invocation of RowRestored events /// </summary> internal void DoRowRestoredEvent(GridPanel panel, SelectedElements selRows) { if (RowRestored != null) { GridRowRestoredEventArgs ev = new GridRowRestoredEventArgs(panel, selRows); RowRestored(this, ev); } }
/// <summary> /// Handles invocation of RowRestoring events /// </summary> internal bool DoRowRestoringEvent(GridPanel panel, SelectedElements selRows) { if (RowRestoring != null) { GridRowRestoringEventArgs ev = new GridRowRestoringEventArgs(panel, selRows); RowRestoring(this, ev); return (ev.Cancel); } return (false); }
private void RestoreRows(GridPanel panel, SelectedElements selRows) { for (int i = selRows.Ranges.Count - 1; i >= 0; --i) { SelectedRange range = selRows.Ranges[i]; if (panel.VirtualMode == true) { panel.SetDeletedRows(range.StartIndex, range.Count, false); } else { for (int j = range.EndIndex; j >= range.StartIndex; --j) { GridContainer row = panel.GetRowFromIndex(j); if (row != null) row.IsDeleted = false; } } } DoRowRestoredEvent(panel, selRows); }
private void DeleteRows(GridPanel panel, SelectedElements selRows) { BeginUpdate(); for (int i = selRows.Ranges.Count - 1; i >= 0; --i) { SelectedRange range = selRows.Ranges[i]; if (panel.VirtualMode == true) { panel.SetDeletedRows(range.StartIndex, range.Count, true); } else { for (int j = range.EndIndex; j >= range.StartIndex; --j) { GridContainer row = panel.GetRowFromIndex(j); if (row != null) row.IsDeleted = true; } } } if (_ActiveRow != null && _ActiveRow.IsDeleted == true) { if (_ActiveRow.Parent != null) ActiveRow = ((GridContainer)_ActiveRow.Parent).GetNextLocalItem(_ActiveRow.RowIndex); } //panel.UpdateRowCountEx(); EndUpdate(); DoRowDeletedEvent(panel, selRows); }
///<summary> /// GridRowRestoringEventArgs ///</summary> ///<param name="gridPanel"></param> ///<param name="selRows"></param> public GridRowRestoringEventArgs(GridPanel gridPanel, SelectedElements selRows) : base(gridPanel, selRows) { }
///<summary> /// GridRowDeletedEventArgs ///</summary> ///<param name="gridPanel"></param> ///<param name="selRows"></param> public GridRowDeletedEventArgs(GridPanel gridPanel, SelectedElements selRows) : base(gridPanel) { _SelectedRows = selRows; }
internal SelectedElements Copy() { SelectedElements copy = new SelectedElements(); foreach (SelectedRange range in _Ranges) copy.AddRange(range.StartIndex, range.EndIndex); return (copy); }