Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Text alignment of individual columns?
posted

Maybe this is glaringly obvious, but I've searched the forums and looked at the documentation and can't find anything that describes how it is possible to individually align columns.  I know flowdirection will make a grid align one way or the other, but I'd like to have one column aligned left and one aligned right.  Is there any way to accomplish this? 

EDIT: Okay, I've found that you can set the FlowDirection of the DataRecordCellArea, but is it possible to set that in the codebehind? If not, where would I need to put it in an itemspaneltemplate that has a grid?

Thanks,
Matt

Parents
  • 4850
    Offline posted

    Hi Matt,

    One way to do it is to specify the HorizontalAlignment for the editor used in the cell, e.g.

    <igDP:XamDataPresenter.FieldLayouts>

    <igDP:FieldLayout>

    <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.Fields>

    </igDP:FieldLayout>

    </igDP:XamDataPresenter.FieldLayouts>

Reply Children