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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

[Bug] Using a DataTemplate for a GridTemplateColumn

Thread ID:

Created:

Updated:

Platform:

Replies:

123818 Apr 24,2016 05:50 PM UTC Apr 25,2016 12:59 PM UTC Xamarin.Forms 1
loading
Tags: SfDataGrid
John
Asked On April 24, 2016 05:50 PM UTC

Hi,

I'd like to set a global CellTemplate, which I use for a GridTemplateColumn.

I defined the following DataTemplate in my App.xaml:
<DataTemplate x:Key="myCell">
<Label Text="{Binding}"/>
</DataTemplate>

But if I use this DataTemplate in a GridTemplateColumn as CellTemplate, the binding won't work:
<syncfusion:GridTemplateColumn MappingName="name" HeaderText="Name" CellTemplate="{StaticResource myCell}"/>

If I set the binding in the DataTemplate to {Binding name}, I get the property. But I'd like to use the datatemplate dynamically.
Even if I set the BindingContext="{Binding name}" for the GridTemplateColumn, I won't get any result.

Any ideas on how to solve this issue?
Thanks!

Vimal Prabhu Manohkaran [Syncfusion]
Replied On April 25, 2016 12:59 PM UTC

Hi John,

Thanks for contacting Syncfusion support.

Currently we dont have support for reusing same data template for multiple columns. However we have logged a feature request for the same and it can be expected to roll out in any of our upcoming releases .

Regards,
Vimal Prabhu 


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.

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

;