This should be an easy one:
I'm trying to get my column to right-align the content. Either HorizontalContentAlignment isn't the right property, or I'm doing something wrong.
See the following. The content is still left-justified. The background color is still lime, however, so I know the properties are getting picked up.
Thanks if you can help.
<igDP:Field Name="somestring">
<igDP:Field.Settings>
<igDP:FieldSettings>
<igDP:FieldSettings.CellValuePresenterStyle>
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Background" Value="Lime"/>
</Style>
</igDP:FieldSettings.CellValuePresenterStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
Hello,I have been looking into your post and I have used the provided XAML code in order to reproduce your issue but it seems like that everything works ok on my side and the content is right-aligned as expected. I am sending you my sample application(DataGridCellValuePresenterRightAlign.zip).
If the sample does not satisfies all your needs feel free to modify it, so it reproduces your behavior, and send it back to me for further investigation.
Could my problem be due to my using v10.3?
When I opened your app, the references to your IG 11.x were broken, of course. I replaced them with references to my 10.3, and rebuilt. When I ran the app, the column was still left-aligned.
So I'm thinking that 10.3 might be the problem.
Hello,
I can suggest you download the last Service Release for our NetAdvantage 10.3 product where this issue is fixed. You can download the Service Releases by logging to our web site and going to My IG \My Keys and Downloads.
With the service pack, your example works.
But it seems the behavior for decimal fields isn't the same as string fields. I want to left-justify my decimal field in a different column.
In your example program, I changed the BasePrice's type to decimal, and added a field for it to the grid. Setting HorizontalContentAlignment doesn't seem to affect the decimal field. (Altered files are attached for your reference.)
Any insight as to what's going on here?
I am just checking if you require any further assistance on the matter.
I'll have to get back to you in a few days. My primary dev machine crashed yesterday. I will provide an update when I'm up and running again.
Thank you for your feedback. If you need any further assistance on this matter in future, do not hesitate to contact us.