I'm using the XamDataPresenter with a GridView for the view, in the new NetAdvantage for WPF beta. I need to do two simple things, but I can't seem to find the answer:
1. How can I set alignment of cell values by column/field? For example, I'd like to left align one integer field/column, center align another integer field/column, and right align yet another (the default).
2. How can I format cell values by column/field? For example, I'd like one double field to always have at least 2 decimal places, another double field to be formatted as currency, and an integer field formatted as a phone number.
Examples would be excellent, but if anyone can at least just point me in the right direction I'm sure I can figure it out. I've been searching through help files and Mole for over an hour and haven't figured this out yet.
This does nothing. Darn. I have been trying to align a date column to the right all day with no luck.
This tip looks perfect, but it does nothing. There is no change in my UI after adding this code.
Here is an example of setting up the masking for a phone number field using a XamMaskedEditor:
<igDP:XamDataPresenter.FieldLayouts>
<igDP:FieldLayout.Fields>
<igDP:Field Name="Phone number">
<igDP:Field.Settings>
<igDP:FieldSettings EditorType="{x:Type igEditors:XamMaskedEditor}">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="igEditors:XamMaskedEditor">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Mask" Value="(###)###-####"/>
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
</igDP:FieldLayout>
</igDP:XamDataPresenter.FieldLayouts>
Note: all of the editors also expose a Format property for use when the cell is not in edit mode. I hope this helps.