We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Is it possible to update binding source of a GridTextColumn as soon as a change is made?

Hi,

I'm using GridTextColumn in an sfDataGrid and I'd like the underlying binded property (set by MappingName property) is set as soon as the user changes the column cell value.
By default, instead, the binded property is changed only when the focus leaves the cell and moves to another cell.
Is there the possibility to configure this behaviour on the cell as I'd do with normal binding using "UpdateSourceTrigger=PropertyChanged" ?

Thank you,

Silvio

3 Replies

BR Balamurugan Rajaraman Syncfusion Team March 29, 2017 05:51 PM UTC

Hi Silvio, 
 
Thank you for contact Syncfusion support. 
 
We have analyzed your query “Is it possible to update binding source of a GridTextColumn as soon”. You can able to achieve your requirement by setting the UpdateTriggere property as PropertyChanged for the GridTextColumn as like the below provided code sample.  
 
 
<syncfusion:SfDataGrid ItemsSource="{Binding Orders,UpdateSourceTrigger=PropertyChanged}" AllowEditing="True" AutoGenerateColumns="False"> 
            <syncfusion:SfDataGrid.Columns> 
                <syncfusion:GridTextColumn UpdateTrigger="PropertyChanged" MappingName="OrderID"/> 
                <syncfusion:GridTextColumn UpdateTrigger="PropertyChanged" MappingName="CustomerID"/> 
                <syncfusion:GridTextColumn UpdateTrigger="PropertyChanged" MappingName="CustomerName"/> 
                <syncfusion:GridTextColumn UpdateTrigger="PropertyChanged" MappingName="Country"/> 
                <syncfusion:GridTextColumn UpdateTrigger="PropertyChanged" MappingName="ShipCity"/> 
            </syncfusion:SfDataGrid.Columns> 
        </syncfusion:SfDataGrid> 
 
We have attached the modified sample for your reference. You can download it from the below location. 
 
 
Regards, 
Balamurugan R 
 



SI Silvio March 30, 2017 07:08 AM UTC

Thank you for your sugestion and help.


BR Balamurugan Rajaraman Syncfusion Team March 31, 2017 04:16 AM UTC

Hi Silvio 
 
Thank you for the Update. 
 
Please let us know if you have any further assistance on this. 
 
Regards, 
Balamurugan R 


Loader.
Live Chat Icon For mobile
Up arrow icon