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.

Bug in binding the text of the headerText in a stackedColumn

Thread ID:





119318 Jun 4,2015 10:30 AM Jun 19,2015 09:55 AM WinRT 3
Tags: SfDataGrid
Asked On June 4, 2015 10:30 AM


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 5, 2015 11:20 PM

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 11:49 AM

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 09:55 AM

 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.

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.