I'm trying to left-align a checkbox column in an UltraWinGrid in Card View mode.
CardSettings.AutoFit = true, which causes the cells to be as wide as the grid.
One of the cells is a checkbox (i.e Column.Style = CheckBox) , which by default is centered in the cell. I need it to be left-justified because it gets lost in the middle of the screen.
I've tried setting TextHAlign and ImageHAlign to "left" in both CellAppearance and CellButtonAppearance, but the checkbox remains centered.
How do I left-align it?
Cast the value of the column's Editor property to type Infragistics.Win.CheckEditor, then set the CheckAlign property.
Thanks. It works perfectly...
Infragistics.Win.
CheckEditor checkEditor;
checkEditor = (Infragistics.Win.CheckEditor)gLoadAttribute.DisplayLayout.Bands[0].Columns["myBoolean"].Editor;
checkEditor.CheckAlign = System.Drawing.
ContentAlignment.MiddleLeft;
Hi,
I just wanted to point out one small caveat here.
The grid re-uses the same editor for multiple columns. So if you have 10 checkbox columns, the code you have here will change the CheckAlign on all of them.So if that's what you want, then this code is fine.
But if you only want to affect some CheckBox columns and not others, then you could do that by creating a new CheckEditor and assigning it to the column(s).