UpdateSourceTrigger Property is Ignored

PROBLEM

The UpdateSourceTrigger property of the column's DataMemberBinding is ignored.

CAUSE

The reason for this behaviour is that the RadGridView overrides and changes the "Binding.UpdateSourceTrigger" property to be "Explicit". This is a design choice to improve performance, since otherwise validation and commit operations would happen on every key stroke.

SOLUTION

You can overcome that by using the CellEditTemplate property of the column and setting the UpdateSourceTrigger of the binding applied to the element in edit mode (for example the editing element for GridViewDataColumn is a TextBox). This approach is demonstrated in Example 1.

Example 1: Setting the UpdateSourceTrigger of a binding to a Property of the element in the CellEditTemplate

<!-- In this example we have a column bound to the Name property of our model--> 
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"> 
    <telerik:GridViewDataColumn.CellEditTemplate> 
        <DataTemplate> 
            <TextBox Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}" /> 
        </DataTemplate> 
    </telerik:GridViewDataColumn.CellEditTemplate> 
</telerik:GridViewDataColumn> 

See Also

In this article