I have a custom checkbox control that I created and I have a column in my grid with that control as its EditorControl.
grdActions.DisplayLayout.Bands(0).Columns("Yes").EditorControl = chkCheckBox
I am unable to get the checkbox control to be centered in the grid cell. Is there a way to do this?
Thanks.
Hello Shipman,
Please try Mike`s suggestion or send us small sample. I`ll be glad to research it for you.
Let me know if you have any questions.
Regards
If your CheckEditor is using the Custom style, then the CheckAlign property probably doesn't matter. You need to set the ImageHAlign on whatever Appearance you are using to apply the image - Appearance, CheckedAppearance, UncheckedAppearance, and/or IndeterminateAppearance.
If that doesn't help, maybe you could post a small sample app with your control and we could take a look. Worst-case, you might need a CreationFilter, but it wouldn't be a very difficult one.
Thanks Georgi but I do have the CheckAlign property set as you described. Maybe it has something to do with the checkbox being in a grid? I'm working on another project at the moment so I'll have to pick this up again at a later date.
Hi,
If you using inheritance of our UltraCheckEditor, then you could set CheckAlign =ContentAlignment.MiddleCenter; property in your custom control. This functionality exist in version 8.1, and works properly.
Thanks for your reply Georgi. My custom checkbox control does inherit from Infragistics.Win.UltraWinEditors.UltraCheckEditor. It is customized for a touch screen application so it is a large box with a special graphic for the check itself. I have the Style property set to "Custom" to prevent the default checkbox from appearing inside of my control. I have attached a screenshot of the control as it appears in my grid. You will notice that the checkbox itself is not centered in the cell, but rather it appears to be left justified. The position of the check inside the box is fine. I just would like to center the box in the cells.
I should have mentioned that I am using version 8.1 of the Infragistics controls.