Inputting Data
When a user inputs data into the grid at run time, there are two distinct steps involved: inputting data in the grid cell's user interface and changing the source item's underlying property value.
In the first stage, the end user inputs data into a UI element representing a grid cell editor (for example a TextBox), which is bound to the Value property. That means in this stage the end user implicitly changes the value of the Value property. Note that the same action can also be performed explicitly with code assigning the Value property value.
In the second stage, the ItemCell.Value property value is propagated to the underlying source item's property. This happens when a grid cell leaves edit mode, either implicitly when the end user interacts with the grid (for example by selecting another cell or pressing the ENTER key), or explicitly by calling the EndEdit method of ItemCell or ItemCellPresenter object that represents the cell.
The following topics detail these two stages.
Note: You can set the grid so that changes are committed to the underlying data source before the user leaves the cell edit mode. For details, see Committing Data to a Data Source.
|