![]() |
![]() |
In Virtual Events data mode, grid uses events to fetch cell data. Data must be stored and maintained by application itself. Four virtual data mode events are used for reading, writing, adding and deleting rows.
When grid needs data for a row it fires VirtualReadData event. In an event handler, you must initialize SGRowBuffer object passed as a parameter. To pass row data to grid control, use Value property. To inform grid that there are no more rows, set RowIndex property to -1.
When user changes data, grid fires VirtualWriteData event and you should copy data from the SGRowBuffer to your application's buffer. Also, you can cancel data update by setting Cancel property to True.
When a new row needs to be added, grid fires VirtualAddRow event. Row buffer parameter contains data for a new row and you should store it into the application's dataset. Add row operation can be canceled by setting Cancel parameter to True.
When a row must be deleted, grid fires VirtualDeleteRow event. Use RowIndex and RowBookmark parameters to identify row that should be deleted from the application's dataset. To cancel row delete operation, set Cancel parameter to True.