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. Image for the cookie policy date

Bug in binding the text of the headerText in a stackedColumn


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)" />






3 Replies

SM Saravanan M Syncfusion Team 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,

AU Aurélien 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,

SM Saravanan M Syncfusion Team 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.



Live Chat Icon For mobile
Up arrow icon