I have a List Control with four columns, two of which are numeric. I want these to be right aligned.
I have CellAlignment for ColumnCRSID1 set to CentreRight but they remain left aligned.
Is there some other setting I need?
Cell Alignment in Grid
-
GregSippel
- Posts: 25
- Joined: Thu May 19, 2016 11:34 am
Re: Cell Alignment in Grid
Try DisplayAlignment(Right) for the column and leave cellAlignment as center.
Re: Cell Alignment in Grid
Thanks Greg, That worked. What is the cell alignment for?
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Cell Alignment in Grid
Be default, all content fills the available space in the cell. This is governed by the CellSizing property which defaults to FitBoth. This makes sense for typical data values as there's really no reason for the control to do anything else.
However, images and buttons in particular look a little odd filling the whole cell, so by setting CellSizing to none, a button is then whatever size you give it and can be moved around the cell using the CellAlignment. There's probably little need for it beyond center, but it's there just in case.
However, images and buttons in particular look a little odd filling the whole cell, so by setting CellSizing to none, a button is then whatever size you give it and can be moved around the cell using the CellAlignment. There's probably little need for it beyond center, but it's there just in case.