wpf-devexpress-dot-xpf-dot-grid-dot-gridrowvalidationeventargs-f5ea845f.md
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool IsNewItem { get; }
Public ReadOnly Property IsNewItem As Boolean
| Type |
|---|
| Boolean |
The following code snippets (auto-collected from DevExpress Examples) contain references to the IsNewItem property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml.cs#L21
var row = (User)e.Row;
if(e.IsNewItem)
_Context.Users.Add(row);
wpf-data-grid-extend-crud-operations/CS/Undo/UndoCRUDOperationsBehavior.cs#L103
var item = e.Row;
var isNewItem = e.IsNewItem;
undoAction = e.IsNewItem ? new Action(() => UndoAddAction(item)) : new Action(() => UndoEditAction(item));
wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml.cs#L116
void CreateUpdateRow(object sender, DevExpress.Xpf.Grid.GridRowValidationEventArgs e) {
if(e.IsNewItem) {
e.UpdateRowResult = IssuesService.AddNewIssueAsync((IssueData)e.Value);
wpf-data-grid-extend-crud-operations/VB/Undo/UndoCRUDOperationsBehavior.vb#L132
Dim item = e.Row
Dim isNewItem = e.IsNewItem
undoAction = If(e.IsNewItem, New Action(Sub() UndoAddAction(item)), New Action(Sub() UndoEditAction(item)))
See Also
GridRowValidationEventArgs Class