This is a migrated thread and some comments may be shown as answers.

[Solved] Dynamic updating of column headers?

4 Answers 81 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andreas
Top achievements
Rank 1
Andreas asked on 26 Jul 2013, 08:39 AM
I am binding DataGridTextColumn headers to properties of a ViewModel - which basically works ok:

<Control.Resources>
   <local:ActiveCollectionViewModel x:Key="viewModel"/>
</Control.Resources>
...
<Grid.DataContext>
   <local:ActiveCollectionViewModel />
</Grid.DataContext>
...
<Grid:RadDataGrid AutoGenerateColumns="False" >
   <Grid:RadDataGrid.Columns>
      <Grid:DataGridTextColumn Header="{Binding Path=ActiveQuestionLabel,Source={StaticResource viewModel}}" PropertyName="Question" />
      <Grid:DataGridTextColumn Header="{Binding Path=ActiveAnswerLabel,Source={StaticResource viewModel}}" PropertyName="Answer" />
   </Grid:RadDataGrid.Columns>
</Grid:RadDataGrid>

However, if properties are updated dynamically, these changes do not get reflected when binding is done like this.

Is there a better way to bind column headers to properties so that dynamic changes are reflected?

Thanks,
Andreas

4 Answers, 1 is accepted

Sort by
0
Accepted
Rosy Topchiyska
Telerik team
answered on 30 Jul 2013, 10:41 AM
Hello Andreas,

Thank you for your question.

I have to admit that this is a bug with the RadDataGrid control. If you reorder the columns manually the display text in the headers will be updated. I have redirected this issue to our devteam and they will do their best to fix it for Q3 2013. Sorry for any inconvenience this has caused you. I have also updated your Telerik points for your valuable feedback.

Please, feel free to contact us again if there is anything else we can help you with.

Regards, Rositsa Topchiyska
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Andreas
Top achievements
Rank 1
answered on 30 Jul 2013, 12:27 PM
Hi Rositsa,

Thanks for letting me know.

Is there a chance to get an update once it's fixed? Or any other way to stay in the loop regarding this bug?

Cheers,
Andreas

0
Ivaylo Gergov
Telerik team
answered on 30 Jul 2013, 04:37 PM
Hello Andreas,

I will write you back in this forum thread as soon as this bug is fixed.

Let us know should you have any further questions.

Regards,
Ivaylo Gergov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ivaylo Gergov
Telerik team
answered on 14 Oct 2013, 08:18 AM
Hi Andreas,

I would like to inform you that our Q3 2013 BETA release is available for download and it includes the mentioned fix.

 

Regards,
Ivaylo Gergov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Grid for XAML
Asked by
Andreas
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Andreas
Top achievements
Rank 1
Ivaylo Gergov
Telerik team
Share this question
or