We’ve noticed that by default, the row and column headers that have NULL values are shown as “N/A”.
How can we change this to a user-defined text?
Thanks
Mircho, I knew it had to be something easy.
Thank you!!!
Hi,
Thanks for the provided information. In XAML it is possible to do this. Yon have to use property "NullDataLevelMemberName":
<HierarchyDescriptor ...>
<HierarchyDescriptor.LevelDescriptors>
<HierarchyLevelDescriptor .... NullDataLevelMemberName="user defined" />
</HierarchyDescriptor.LevelDescriptors>
</HierarvhyDescriptor>
In the level descriptor you can even set the property "AllowNullDataLevelMember". This property controlls if null members are visible or not.
Thanks,
M.Yovchev
also, to make sure we're on the same page on this, i've included a link to a screenshot of the "N/A" header in question.
Since all of the null values show up as N/A, I was suspecting there should be some kind of configuration where this is set. Am I wrong?
this sounds promising.
All of our hierarchy descriptors are in XAML as our standard and we've been struggling to find a way to mix XAML and code behind. That being said, is there a way to put what you did above on XAML?
Hi pidong,
You can change "N/A" header cell text in your hierarchy descriptor:
hierarchyDescriptor = new hierarchyDescriptor(p => p.PropertyOfModelClass);
hierarchyDescriptor.AppliesToPropertiesOfType = typeof(PropertyOfModelClassType)
hierarchyDescriptor.AddLevel(p => (p!= null)? p.Value.PropertyName.ToString() : "userdefined text", "LevelName");
Hope this is helpful for you. If you have any other concerns do not hesitate to ask.