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
280
Centering a control in an UltraWinGrid cell
posted

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.

Parents
  • 53790
    posted

    Hello Shipman,

     

    I`m not sure what is the functionality of your custom Checkbox control, but if you implement our UltraCheckEditor, then you could apply the code below:

    UltraCheckEditor ue = new UltraCheckEditor();

    ue.CheckAlign = ContentAlignment.MiddleCenter;

    ue.Text = "My sample text";

    ultraGrid1.DisplayLayout.Bands[0].Columns["C"].EditorComponent = ue;

    to achieve desired look and feel.

    Another possible solution could be if you set Style property to br "CheckBox"

    Let me know if you have any questions.

     

     

Reply Children