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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





13865 May 12,2004 03:35 PM UTC May 12,2004 07:04 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On May 12, 2004 03:35 PM UTC

Hi, Why am i getting an outofrange exception while trying to set a column to CheckBox. this.gridListControl1.DataSource = this.dataSet201.drivers; this.gridListControl1.DisplayMember = "Driver No"; this.gridListControl1.ValueMember = "Driver No"; this.gridListControl1.Grid.Model.ColStyles[2].CellType = "CheckBox"; or this.gridListControl1.Grid.Model.ColStyles["Called In"].CellType = "CheckBox"; tia

Administrator [Syncfusion]
Replied On May 12, 2004 05:06 PM UTC

GridListControl is uses the embedded grid in a virtual manner. It does not allocate space for column styles. This is why you are getting this error. To provide a column style, subscribe to the gridListControl1.Grid.ModelQueryCellInfo event. There, if e.ColIndex points to your column, and e.RowIndex > 0, set e.Style.CellType (and maybe CheckBoxOptions as well).

Administrator [Syncfusion]
Replied On May 12, 2004 06:10 PM UTC

thanks, but now the check boxes aren''t checked when the field value is true (or 1). i''m missing something... thanks

Administrator [Syncfusion]
Replied On May 12, 2004 07:04 PM UTC

How have you set your CheckBoxOptions? To know how to set them, you can run the code without the CellType set to CheckBox. This will then show the values being used as true and false in the column. Then, add a line like: gridlistControl1.Grid.TableStyle.CheckBoxOptions = new GridCheckBoxCellInfo(trueValueString, falseValueString, "", true); You can set this in FormLoad. falseValueString and trueValueString are the values you see when you do not have the CellType set to checkbox.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon