Transactions
Grid Transaction API
Efficient delta updates using manual transaction APIs. Perfect for high-performance scenarios with millions of rows.
Manual Add Transaction
Use AddRowsAsync() to add rows without refreshing the entire grid.
Total: 10 rows (Added via transaction API - no full refresh)
When to use AddRowsAsync()
- Adding new rows from API responses
- Real-time data feeds (WebSocket, SignalR)
- Optimistic UI updates after create operations
- When you control the data source manually (not ObservableCollection)
Manual Update Transaction
Use UpdateRowsAsync() to update specific rows efficiently.
11 pending orders
When to use UpdateRowsAsync()
- Updating rows after API PATCH/PUT responses
- Real-time updates from WebSocket messages
- Optimistic UI updates after edit operations
- Batch status updates (e.g., mark as "Shipped")
Manual Remove Transaction
Use RemoveRowsAsync() to remove rows without full grid refresh.
30 rows remaining
When to use RemoveRowsAsync()
- After successful DELETE API calls
- Removing expired/invalid rows
- Bulk delete operations
- When you manually manage the data list (not ObservableCollection)
Combined Transaction Operations
Perform multiple operations (add, update, remove) simultaneously for complex scenarios.
Total: 20 orders
Pending: 8 | Shipped: 4 | Delivered: 3
Real-world Combined Operations
- Order Processing: Ship pending (update), archive delivered (remove), add new orders
- Inventory Sync: Add new products, update prices, remove discontinued items
- User Management: Activate new users, update roles, remove inactive accounts
- All in one efficient operation - Single grid transaction, minimal DOM updates
Performance Comparison
Compare full refresh vs. transaction API performance
❌ Full Refresh (Slow)
// Remove 1 item from 10,000 rows
orders.Remove(order);
orders = new List<Order>(orders); // Trigger re-render
// Result: ALL 9,999 rows re-rendered 🐌✅ Transaction API (Fast)
// Remove 1 item from 10,000 rows
orders.Remove(order);
await grid.RemoveRowsAsync(order);
// Result: Only 1 row removed from DOM ⚡Best Practices
- Use ObservableCollection when you own the data source (simplest)
- Use Transaction APIs when integrating with external data sources (APIs, SignalR)
- Batch operations when possible (e.g., AddRowsAsync([...]) instead of multiple AddRowsAsync())
- Avoid full refresh when only a few rows changed