Hi,
args.Row.Cells["ParameterValue"].Appearance.TextHAlignAsString = "Center"
but it does not seem to work.
regards
Stefan
I found a similar question you had answered and used that method.
I was only using one option so changing the checkbox to look like an option button worked.
//Make the Checkbox look like an option button
UltraCheckEditor b = new UltraCheckEditor();
b.GlyphInfo = UIElementDrawParams.Office2007RadioButtonGlyphInfo;
e.Layout.Bands[0].Columns["Last"].EditorControl = b;
b.CheckAlign = ContentAlignment.MiddleCenter;
Mike,
I have a similar issue but am using a UltraOptionSet instead of a Checkbox. I used one of the examples on the website to do this. On the grid InitLayout event
I added
UltraOptionSet
u = new Infragistics.Win.UltraWinEditors.UltraOptionSet();
u.Items.Add(
new ValueListItem(true, ""));
u.Items.ValueList.DisplayStyle =
ValueListDisplayStyle.DisplayText;
e.Layout.Bands[0].Columns[
"Last"].EditorControl = u;
The option button shows up in the upper left hand corner of the cell. I would like to center it.
I have tried
"Last"].CellAppearance.TextHAlign = HAlign.Center;
"Last"].CellAppearance.TextVAlign = VAlign.Middle;
and
u.Appearance.TextHAlign =
HAlign.Center;
u.Appearance.TextVAlign =
VAlign.Middle;
Any ideas on how to do this?
Thanks
Walter
Hm, I'm not sure. My guess is that the text always aligns left when editing. But I'm not really sure why that would be. Perhaps you should Submit an incident to Infragistics Developer Support.
By the way, why are you using TextHAlignAsString instead of TextHAlign? The "AsString" properties are just there for serialization and they don't even show up in the Intellisense.
Thanx!!!! It really works!
I am sorry I have to bug you again...
This does not work with a numeric editor.
oNum = NEW Infragistics.Win.UltraWinEditors.UltraNumericEditor(); oNum.Appearance.TextHAlign = Infragistics.Win.HAlign:Right ; args.Row.Cells["ParameterValue"].EditorControl = oNum; args.Row.Cells["ParameterValue"].Appearance.TextHAlignAsString = "Right";
If the cell is not selected and ative then it is aligned correct, but as soon as I click into the cell the alignment goes to the left again. What am I doing wrong?
Hi Stefan,
That all makes perfect sense. What you need to do is set the CheckAlign property on the UltraCheckedEditor control.