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 in binding the text of the headerText in a stackedColumn

Thread ID:





119318 Jun 4,2015 02:30 PM UTC Jun 19,2015 01:55 PM UTC WinRT 3
Tags: SfDataGrid
Asked On June 4, 2015 02:30 PM UTC


I want to bind the text value of headerText in a stackedColumn.

The first time, at initialization, the value is correctly taken into account. It is no more taken into account during the next changes.

Best regards.


Example :

<Page x:Name="pageRoot">


<behaviour:NameScopeBinding x:Key="pageSource" Source="{Binding ElementName=pageRoot}"/>


 <grid:SfDataGrid ItemsSource="{Binding ListDataTable}" AutoGenerateColumns="False" 

 BorderThickness="1" HorizontalAlignment="Right" ManipulationMode="System">


<grid:SortColumnDescription ColumnName="Ca" SortDirection="Descending" />



<grid:GridTextColumn HeaderText="Parametre" MappingName="Parametre" />

<grid:GridNumericColumn HeaderText="Fournis" MappingName="Fournis" TextAlignment="Right" FormatString="### ##0 ex." Width="90" />

<grid:GridNumericColumn HeaderText="Ventes" MappingName="Ventes" TextAlignment="Right" FormatString="### ##0 ex." Width="90" />

<grid:GridNumericColumn HeaderText="TxInv" MappingName="TxInv" TextAlignment="Right" FormatString="##0.# %" Width="90" />

<grid:GridNumericColumn HeaderText="CA" MappingName="Ca" TextAlignment="Right" FormatString="### ##0 €" Width="90" />

<grid:GridNumericColumn HeaderText="Fournis" MappingName="EvolFournis" TextAlignment="Right" FormatString="##0.# %" Width="80" />

<grid:GridNumericColumn HeaderText="Ventes" MappingName="EvolVentes" TextAlignment="Right" FormatString="##0.# %" Width="80" />

<grid:GridNumericColumn HeaderText="TxInv" MappingName="EvolTxInv" TextAlignment="Right" FormatString="##0.# pt" Width="80" />

<grid:GridNumericColumn HeaderText="CA " MappingName="EvolCa" TextAlignment="Right" FormatString="##0.# %" Width="80" />





<grid:StackedColumn ChildColumns="Fournis,Ventes,TxInv,Ca" HeaderText="{Binding Source.DataContext.LibellePeriode, Source={StaticResource pageSource}}" />

<grid:StackedColumn ChildColumns="EvolFournis,EvolVentes,EvolTxInv,EvolCa" HeaderText="Evolutions (P-1)" />






Saravanan M [Syncfusion]
Replied On June 6, 2015 03:20 AM UTC

Hi Aurelien,
Thank you for contacting Syncfusion support,
We have analyzed your query and you could not update the HeaderText property  of StackedColumn directly. In your sample, you have created the separate instance of ViewModel as static resource for stacked column, hence it not updates the header text while changing the property at runtime. So we need to define the resource globally in App.XAML file and set it as DataContext to Window and use the same resource to StackedColumn to make it work. Please refer the below code snippet.


        <local:ViewModel x:Key="stackedHeader"/>









    DataContext="{StaticResource stackedHeader}">


         <syncfusion:StackedColumn  ChildColumns="ProductId,ProductName"  HeaderText="{Binding StackedText,Source={StaticResource stackedHeader},Mode=TwoWay}"  />

        <syncfusion:StackedColumn ChildColumns="NoOfOrders,OrderDate" HeaderText="OrderDetails" />

         <syncfusion:StackedColumn ChildColumns="CountryName,ShipCity" HeaderText="ShipDetails" />


We have prepared the sample based on your requirement and you can download it from following location,
Sample Location: SfDataGridSample
Please let us know if you have any other queries,

Replied On June 18, 2015 03:49 PM UTC

Thanks for your reply.
I've just forget to define mode with TwoWay value in the Binding parameter.

Best regards,

Saravanan M [Syncfusion]
Replied On June 19, 2015 01:55 PM UTC

 Hi Aurelien,

Thanks for your update. Please let us know if you need further assistance on this query.




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