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
760
Column Alignment
posted

Please find the attached sample. I am trying to align Age column to Right using HorizontalContentAlignment of CellValuePresenter.

When the grid is loaded the data is left aligned but when clicking on the cell the editor does align value to Right.

How can I align the column to right ALL the time i.e. in readonly mode (without editor)

Tahir

AlignmentIssue.zip
  • 138253
    Offline posted

    Hello Tahir,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and the sample you provided and I modified it, so now it works as you want. Basically I create a Style for the XamTextEditor instead of CellValuePresenter, because it is the control used to display the value in the XamDataGrid’s Cell and set its TextAlignment and HorizontalContentAlignment properties to Right.

     

    Feel free to write me if you have further questions.

    AlignmentIssue.zip