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.
Unfortunately, activation email could not send to your email. Please try again.

update binding source of a GridTextColumn as soon as a change is made

Thread ID:

Created:

Updated:

Platform:

Replies:

129810 Apr 4,2017 05:42 PM Apr 16,2018 08:07 AM Xamarin.Forms 5
loading
Tags: SfDataGrid
Pawan Jindal
Asked On April 4, 2017 05:42 PM

Hello,
I am using sfdatagrid in a Xamarin Forms application with MVVM. I am binding the columns through the MappingName property. I want to support the edit functionality within the Grid. It seems it only updates the binded property when the focus leaves the cell to another cell. Is it possible to update the underlying property as soon as  user changes the column cell value. I found another article here with the same issue here https://www.syncfusion.com/forums/129684/is-it-possible-to-update-binding-source-of-a-gridtextcolumn-as-soon-as-a-change-is-made for WPF. I can't find any such property in the Xamarin Forms version.

thanks,
Pawan


Pavithra  Sivakumar [Syncfusion]
Replied On April 5, 2017 01:20 PM

Hi Pawan, 
 
Thanks for Contacting Syncfusion support. 
 
We have understand your requirement. Your requirement of updating the underlying property when user changes the column cell value can be achieved by setting Mode=TwoWay in Value binding property . 
 
Refer the below code example for more details. 
 
<sfGrid:SfDataGrid x:Name="dataGrid" 
                       AllowGroupExpandCollapse="True" 
                       AutoGenerateColumns="False" 
                       ItemsSource="{Binding OrdersInfo}"> 
        <sfGrid:SfDataGrid.Columns> 
            <sfGrid:GridTextColumn MappingName="OrderID" ValueBinding="{Binding OrderID, Mode=TwoWay}"/> 
            <sfGrid:GridTextColumn MappingName="CustomerID" ValueBinding="{Binding CustomerID, Mode=TwoWay}"/> 
            <sfGrid:GridTextColumn MappingName="Freight" ValueBinding="{Binding Freight, Mode=TwoWay}"/> 
        </sfGrid:SfDataGrid.Columns> 
    </sfGrid:SfDataGrid> 
 
 
Regards, 
Pavithra S 


Pawan Jindal
Replied On April 5, 2017 02:03 PM

Hi Pavithra,

Thanks so much for the quick reply. That resolved it.

Best,
Pawan

Pavithra  Sivakumar [Syncfusion]
Replied On April 6, 2017 08:33 AM

Hi Pawan, 
  
Thanks for the update. 
  
We are glad to hear that your issue has been resolved. Please let us know, if you may have any other queries. 
  
Regards, 
Pavithra S 
 


Douglas Bustos
Replied On April 14, 2018 02:59 PM

Dont work that with the lasting versions. Please upload demo urgent.

Suriya Kalidoss [Syncfusion]
Replied On April 16, 2018 08:07 AM

Hi Douglas, 
 
We had analyzed your query. We have prepared sample based on your requirement. We have attached working sample for your reference and you can download it from the below link. Please let us know if you require further assistance. 
 
 
Regards, 
Suriya K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;