We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Grid CheckBoxes in the center of the Cell

Thread ID:





24490 Feb 4,2005 01:00 PM Feb 4,2005 02:01 PM Windows Forms 1
Tags: GridControl
Steve Waggoner
Asked On February 4, 2005 01:00 PM

I am trying to use the GridControl (unbound) and have a column that has checkboxes that are centered in the middle of the cell. My checkboxes have not labels, so I just want the actual check box in the center of the cell. Its possible to use the BorderMargins.Left property to move the check box to the center but that causes other problems. Is there a column property to align the contents of a cell to the center?

Felix DeHerrera
Replied On February 4, 2005 02:01 PM

This works for my unbound grid.. ''-- Set up check box cell moGrid.TableStyle.CheckBoxOptions = New GridCheckBoxCellInfo("True", "False", "", True) moGrid(-1, GridCol.Installed).CellType = "CheckBox" moGrid(-1, GridCol.Installed).CellValue = False moGrid(-1, GridCol.Installed).TriState = False moGrid(-1, GridCol.Installed).VerticalAlignment = GridVerticalAlignment.Middle moGrid(-1, GridCol.Installed).HorizontalAlignment = GridHorizontalAlignment.Center


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.