Hello,
I have a datagrid, string header is : "NHPRP \u00B130°"
On a classic WPF datagrid, the header is good : http://gyazo.com/8bc6e73829ee9bd5ef0f8c993a9a4699
On your grid, some parts are missing : http://gyazo.com/63c64b9930377cd6f6930e53aa415b25
Could see why, because it's the most important part in the header ?
Regards
Thank you for your post.
I have been looking into it. I created sample application based on your scenario and I could not managed to reproduce the behavior that you have described. If you are not able to reproduce the issue with the attached sample application, would you please modify it with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter. Would you please provide me with more details about the version of the assemblies that you are using? I have attached and image that illustrate how it visualizes on my side.
Looking forward to hearing from you.
Thanks for your project.
My xaml code is :
<dataPresenter:XamDataGrid AutoFit="True" DataSource="{Binding Path=Lines}" GroupByAreaLocation="None"> <dataPresenter:XamDataGrid.FieldLayoutSettings> <dataPresenter:FieldLayoutSettings FilterUIType="LabelIcons" RecordSelectorLocation="None" /> </dataPresenter:XamDataGrid.FieldLayoutSettings> <dataPresenter:XamDataGrid.FieldSettings> <dataPresenter:FieldSettings AllowEdit="False" CellClickAction="SelectRecord" LabelClickAction="Nothing" /> </dataPresenter:XamDataGrid.FieldSettings> </dataPresenter:XamDataGrid>
On the same vieModel as Lines, there is properties Header1 and Header2 with special characters.
I can't keep specified code for each column name, because thay are based on properties. I can have 2 or 10 headers.
Maybe the xaml need to specify a textbox or an area that can handle the special character for all headers.
Thanks for your help.
I have been looking into it and I am not sure that understand fully your requirements and what you are trying to achieve. If you want to put some symbol as ‘ ° ’ in each cell based on the Field. What I can suggest is to create style for CellValuePresenter for each field by using CellValuePresenterStyle. Also you can create collection with symbols in your view model. In the style you can set ContentTemplate property of CellValuePresenter and create DataTemplate with TextBlock in it. Than you can Bind Text property of TextBlock and by using MultiBinding and StringFormat property you can set the value of the cell and symbol that you want from collection. I created short sample application based on your scenario to show you how you can implement this approach. Please if it does not cover your expectations, modify it with the functionality that you are using, so I can investigate it further for you.
I have a part of the answer. I have one object, with these properties :
new ResultLineViewModel { Frequency = Frequency.FromHz(1), Total = Power.FromDBm(2), Nh45 = Power.FromDBm(1), Nh30 = Power.FromDBm(3) },
And the display is with Frequency, Total, Nh45, Nh30.
I have this on my viewModel : http://gyazo.com/09f82949b1140ec690f530df045d775d
Even if I put the Header1, the display is always Frequency, Header2 is always Total....
How to override this behaviour ?
I have been looking into it, but it seems like I am missing something about your scenario, so if this is still an issue for you, could you please send me, an isolated sample project, where this is reproduced or modify my sample application with the functionality that you are using, so I will be able to investigate it further for you.
I try to reproduce it without luck.
Just an exemple to show you :
You have an object Person with LastName and FirstName.
I build a list with some objects.
I have a list with Headers (type of string) "First Name" and "Last Name".
The control ALWAYS take property names aand not my headers.
So I can't display any spaces or special characters.
I manage to display content with all special characters.
Thanks for your help