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.

Checkboxes on right?

Thread ID:

Created:

Updated:

Platform:

Replies:

24614 Feb 8,2005 09:22 AM Feb 9,2005 09:21 AM Windows Forms 6
loading
Tags: GridControl
John
Asked On February 8, 2005 09:22 AM

Is there a property that will make the box appear on the righthand side of the checkbox control similar to VB.NET where I''d use: chkMyChecbox.CheckAlign = ContentAlignment.MiddleRight I can''t find one in the 1100 or so properties shown by intellisense. :) Thanks!

Administrator [Syncfusion]
Replied On February 8, 2005 10:53 AM

If you want the checkbox on the right instead of the middle, you can set the style.TextMargin property to handle this. this.grid.Binder.InternalColumns["chkCol"].StyleInfo.TextMargins.Left = this.grid.Model.ColWidths["chkCol"] - 20; If you have added GridBoundColumns, use grid.GridBoundColumns instead of grid.Binder.InternalColumns.

John
Replied On February 8, 2005 03:38 PM

Hi Clay, I find the object model unweildly and I don''t understand what your proposing. I am loading a grid with data at runtime in unbound mode. I get to a cell I''d like to put a checkbox in as follows: GridControl1(mRows, 2).Description = "OK" GridControl1(mRows, 2).CellType = "CheckBox" GridControl1(mRows, 2).CellValue = False How can I tell this checkbox to have the box itself on the right hand side of the description? Thanks!

Administrator [Syncfusion]
Replied On February 8, 2005 04:32 PM

Hi John, with a regular grid use these lines: GridControl1(mRows, 2).TextAlign = GridTextAlign.Right; GridControl1(mRows, 2).HorizontalAlignment = GridHorizontalAlignment.Right; // optionally - in case you want to increase space between description text and checker GridControl1(mRows, 2).TextMargis.Right = 5; Stefan >Hi Clay, > >I find the object model unweildly and I don''t understand what your proposing. I am loading a grid with data at runtime in unbound mode. I get to a cell I''d like to put a checkbox in as follows: >GridControl1(mRows, 2).Description = "OK" >GridControl1(mRows, 2).CellType = "CheckBox" >GridControl1(mRows, 2).CellValue = False >How can I tell this checkbox to have the box itself on the right hand side of the description? >Thanks!

John
Replied On February 8, 2005 05:33 PM

Hi Stephan, GridControl1(mRows, 2).TextAlign = GridTextAlign.Right or left seems to have no affect on the cell. I have Essential Grid 1.6.1.8 and the documentation does not list a checkbox as one of the cell types this property effects. The property: GridControl1(mRows, 2).HorizontalAlignment did successfully move checkbox and text to the righthand side of the cell...but I''m still searching for that property that moves the box to the right hand side of the text portion of the control. Thanks!

Administrator [Syncfusion]
Replied On February 8, 2005 05:43 PM

John, It is most likely that TextAlign support was only added after 1.6. I am attaching the code used in 2.x codebase that implements checkboxes. You could take that code and include it into a C# project of your own and with some luck and minor changes you should be able to get that working. GridCheckBoxCell_7436.zip The other option is to upgrade to 2.x or 3.x. Stefan >Hi Stephan, > >GridControl1(mRows, 2).TextAlign = GridTextAlign.Right or left >seems to have no affect on the cell. I have Essential Grid 1.6.1.8 and the documentation does not list a checkbox as one of the cell types this property effects. > >The property: >GridControl1(mRows, 2).HorizontalAlignment >did successfully move checkbox and text to the righthand side of the cell...but I''m still searching for that property that moves the box to the right hand side of the text portion of the control. >Thanks!

John
Replied On February 9, 2005 09:21 AM

Stefan, Thanks for your help. Upgrading to 2.x solved the problem. - John

CONFIRMATION

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.

;