I have a grid where I wish one value to be a fixed unchanging string.
I figured I could use an UnboundField for that, but I can't figure out any way to set the constant string value.
There's gotta be a relatively simple way to do this, right?
(As a workaround, I could bind to a constant string field on my backing data structure, but that seems silly, and I'd rather not.)
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Nailed it, thanks.
I'm sometimes amazed at how much xaml is needed to do simple things.
Thank you for your post. I have been looking into it and I suggest you add the following UnboundField to your FieldLayout:
<igDP:UnboundField Label="MyLabel"> <igDP:UnboundField.Settings> <igDP:FieldSettings> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <TextBlock Text="MyConstantString"></TextBlock> </DataTemplate> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.CellValuePresenterStyle> </igDP:FieldSettings> </igDP:UnboundField.Settings> </igDP:UnboundField>
Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.