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

Error because of GridTemplateColumn

Thread ID:





112542 Sep 27,2013 11:17 AM UTC Sep 30,2013 11:06 AM UTC WinRT 1
Tags: SfDataGrid
Khurram Bhatti
Asked On September 27, 2013 11:17 AM UTC

I have a Win RT syncfusion Grid, which is having GridTemplateColumn and its CellTemplate  contain the button. but when ever I  click on header to sort it throw the error.

Note: Following is the code i am using for the cancel button column and the issue came just after adding this column.

Please suggest me the way to solve this.

<Grid1:GridTemplateColumn Width="120"  HeaderText="Action" TextAlignment="Left" HorizontalHeaderContentAlignment="Left" AllowSorting="False">
                                    <Style TargetType="Grid1:GridHeaderCellControl">
                                        <Setter Property="Background" Value="#1F6996" />
                                        <Button Width="120" HorizontalAlignment="Left" Margin="-15,-2"
                                    Height="45" BorderBrush="Black" BorderThickness="1" Background="#3E61B9" Foreground="White"
                                    Command="{Binding Path=CancelCommand}"
                                     CommandParameter="{Binding AppointmentID}" 
                                    Content="Cancel" Click="Button_Tapped" />

Jai Ganesh S [Syncfusion]
Replied On September 30, 2013 11:06 AM UTC

Hi Khurram,


Thanks for contacting Syncfusion support.


We have analyzed your query. You must define the MappingName for the GridTemplateColumn to perform the Sorting, Grouping and Filtering operations. If your application doesn’t have any bounded property to define the MappingName for the GridTemplateColumn then you can use GridUnBoundColumn instead of GridTemplateColumn to achieve your requirement. For GridUnBoundColumn you can define any string value as MappingName.  Following code snippet to illustrate how to use the GridUnboundColumn,


Code snippet[Xaml]:


<syncfusion:GridUnBoundColumn AllowSorting="True" HeaderText="Action" MappingName="Property">



                                <Button Width="120"






                                    Command="{Binding Path=CancelCommand}"

                                    CommandParameter="{Binding EmployeeCountry}"


                                    Foreground="White" />





Please let us know if you need further assistance.


Thank you,

Jai Ganesh S


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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