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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to overcome the DisplayBinding converter is not firing problem when XamlCompilation attribute is set as XamlCompilationOptions.Compile?

When the GridColumn.DisplayBinding is set in the XAML, provided XamlCompilation attribute is set as XamlCompilationOptions.Compile, the binding converter will not get fired, since the DisplayBinding property is of type Bindinginstead of BindingBase. Changing the type of the property would require lot of internal changes and type conversions. Thus, to resolve this issue, it is suggested to set the DisplayBinding of the column in the code behind.

Refer the below code example in which the above problem is bypassed by setting the GridColumn.DisplayBinding in code behind.

 

Note that the “GridColumn.DisplayBinding” is set in the ViewModel using “Behaviors” to retain the MVVM structure.

 

The following code example illustrates the implementation of the CustomConverter class.

 

On executing the above code example, the output is obtained as follows:

 

C:\Users\suhasini.suresh\AppData\Local\Microsoft\Windows\INetCacheContent.Word\Screenshot_2017-03-03-14-10-25_DataGridDemo.Droid.png

 

Sample Link:

How to overcome the DisplayBinding converter is not firing problem when XamlCompilation attribute is set as XamlCompilationOptions.Compile?

Article ID: Published Date: Last Revised Date: Platform: Control:
7561 03/13/2017 03/13/2017 Xamarin.Forms SfDataGrid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon 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.Close Icon