Class GridDataCurrentRecordManager
CurrencyManager for Grid Data Table Model. It maintains all the editing work and updates the underlying source.
Implements
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class GridDataCurrentRecordManager : Disposable, IDisposable
Remarks
Use the shortcut keys Insert and Delete to insert or delete the current focused record.
Constructors
GridDataCurrentRecordManager(GridDataTableModel)
Initializes a new instance of the
Declaration
public GridDataCurrentRecordManager(GridDataTableModel model)
Parameters
Type | Name | Description |
---|---|---|
GridDataTableModel | model |
Properties
CurrentCell
Gets the current cell.
Declaration
public GridCurrentCell CurrentCell { get; }
Property Value
Type | Description |
---|---|
GridCurrentCell | The current cell. |
CurrentRecordIndex
Gets the index of the current record based on the Records collection.
Declaration
public int CurrentRecordIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the current record. |
CurrentRowIndex
Declaration
public int CurrentRowIndex { get; }
Property Value
Type |
---|
System.Int32 |
HasError
Declaration
public bool HasError { get; }
Property Value
Type |
---|
System.Boolean |
IsEditing
Declaration
public bool IsEditing { get; }
Property Value
Type |
---|
System.Boolean |
IsInAddNewRow
Declaration
public bool IsInAddNewRow { get; }
Property Value
Type |
---|
System.Boolean |
IsInCancelEdit
Declaration
public bool IsInCancelEdit { get; }
Property Value
Type |
---|
System.Boolean |
IsInDeactivate
Gets a value indicating whether this instance is in deactivate.
Declaration
public bool IsInDeactivate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsInDelete
Gets a value indicating whether this instance is in delete.
Declaration
public bool IsInDelete { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsInEndEdit
Declaration
public bool IsInEndEdit { get; }
Property Value
Type |
---|
System.Boolean |
IsModified
Declaration
public bool IsModified { get; }
Property Value
Type |
---|
System.Boolean |
IsRecordCell
Gets a value indicating whether this instance is record cell.
Declaration
public bool IsRecordCell { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Model
Gets or sets the table.
Declaration
public GridDataTableModel Model { get; }
Property Value
Type | Description |
---|---|
GridDataTableModel | The table. |
UpdateMode
Declaration
public UpdateMode UpdateMode { get; }
Property Value
Type |
---|
UpdateMode |
Methods
add_CurrentRecordSelectionChanged(GridDataCurrentRecordSelectionChangedEventHandler)
Declaration
public void add_CurrentRecordSelectionChanged(GridDataCurrentRecordSelectionChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
GridDataCurrentRecordSelectionChangedEventHandler | value |
add_CurrentRecordSelectionChanging(GridDataCurrentRecordSelectionChangingEventHandler)
Declaration
public void add_CurrentRecordSelectionChanging(GridDataCurrentRecordSelectionChangingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
GridDataCurrentRecordSelectionChangingEventHandler | value |
BeginEdit(Int32)
Begins the editing process. Specify the record index to identify the GridDataRecord and start editing on it.
Declaration
public void BeginEdit(int recordIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | recordIndex |
CancelEdit()
Cancels the edit.
Declaration
public void CancelEdit()
ConfirmChanges()
Confirms the changes that were last done with the row.
Declaration
public void ConfirmChanges()
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
EndEdit()
Ends the edit for the current record. If the editing is done for the AddNew row, a new record would be added, otherwise it is a simple update to the underlying source based on the UpdateMode.
Declaration
public bool EndEdit()
Returns
Type |
---|
System.Boolean |
GetValueFromCache(String)
Gets the value from cache.
Declaration
public object GetValueFromCache(string columnMappingName)
Parameters
Type | Name | Description |
---|---|---|
System.String | columnMappingName | Name of the column mapping. |
Returns
Type |
---|
System.Object |
MoveNext()
Moves next to the current row index.
Declaration
public void MoveNext()
MovePrevious()
Moves previous to the current row index.
Declaration
public void MovePrevious()
MoveTo(Int32)
Moves to the specified row idx.
Declaration
public void MoveTo(int rowIdx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIdx | The row idx. |
MoveTo(Int32, Int32)
Moves to the specified row index and column index.
Declaration
public void MoveTo(int rowIdx, int colIdx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIdx | The row idx. |
System.Int32 | colIdx | The col idx. |
MoveToFirst()
Moves to the first row.
Declaration
public void MoveToFirst()
MoveToLast()
Moves to the last row.
Declaration
public void MoveToLast()
OnCurrentRecordSelectionChanged(GridDataCurrentRecordSelectionChangedEventArgs)
Raises the CurrentRecordSelectionChanged event.
Declaration
protected virtual void OnCurrentRecordSelectionChanged(GridDataCurrentRecordSelectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridDataCurrentRecordSelectionChangedEventArgs | args | The GridDataCurrentRecordSelectionChangedEventArgs instance containing the event data. |
OnRecordsSelectionChanging(GridDataCurrentRecordSelectionChangingEventArgs)
Raises the RecordsSelectionChanging event.
Declaration
protected virtual void OnRecordsSelectionChanging(GridDataCurrentRecordSelectionChangingEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridDataCurrentRecordSelectionChangingEventArgs | args | The GridDataCurrentRecordSelectionChangingEventArgs instance containing the event data. |
remove_CurrentRecordSelectionChanged(GridDataCurrentRecordSelectionChangedEventHandler)
Declaration
public void remove_CurrentRecordSelectionChanged(GridDataCurrentRecordSelectionChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
GridDataCurrentRecordSelectionChangedEventHandler | value |
remove_CurrentRecordSelectionChanging(GridDataCurrentRecordSelectionChangingEventHandler)
Declaration
public void remove_CurrentRecordSelectionChanging(GridDataCurrentRecordSelectionChangingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
GridDataCurrentRecordSelectionChangingEventHandler | value |
Events
CurrentRecordSelectionChanged
Occurs when current record selection is changed.
Declaration
public event GridDataCurrentRecordSelectionChangedEventHandler CurrentRecordSelectionChanged
Event Type
Type |
---|
GridDataCurrentRecordSelectionChangedEventHandler |
CurrentRecordSelectionChanging
Occurs when current record selection is changing.
Declaration
public event GridDataCurrentRecordSelectionChangingEventHandler CurrentRecordSelectionChanging
Event Type
Type |
---|
GridDataCurrentRecordSelectionChangingEventHandler |
OnBeginEdit
Occurs when the cell goes into begin edit.
Declaration
public event EventHandler OnBeginEdit
Event Type
Type |
---|
System.EventHandler |
OnEndEdit
Occurs when the cell/row goes into end edit.
Declaration
public event EventHandler OnEndEdit
Event Type
Type |
---|
System.EventHandler |