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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

"gray" a checkbox in runtime

Thread ID:





22733 Dec 20,2004 10:38 PM UTC Dec 22,2004 07:14 AM UTC WinForms 3
Tags: GridControl
Asked On December 20, 2004 10:38 PM UTC

hi gurus, I want to add to a grid certain columns of checkBox Cell-Type. Some cells have to be left unchecked and "gray"ed so that users cannot edit it. These cells are determined at run-time. Is GridControl a must? Pls give some advice. Thanks! Rebecca

Administrator [Syncfusion]
Replied On December 21, 2004 08:10 AM UTC

To make the textbox disabled, you can set the style.Enabled = false for the cell. If you want to do this in a GridDataBoundGrid (on a cell by cell basis), then you shoul duse the grid.Model.QueryCellInfo to handle this. Here is a KB link that discusses doing something similar for ReadOnly cells.

Replied On December 22, 2004 01:24 AM UTC

Thanks a lot. It works. However, I have many columns and rows in the grid and it is very time-consuming. When should I add this event since I have to hide/add/remove columns and rows at run-time.

Administrator [Syncfusion]
Replied On December 22, 2004 07:14 AM UTC

I am not sure I understand your question. You would normally add the event in say Form.Load. Your code in QueryCellInfo would have to use a criteria that did not depend upon information that would be compromised by runtime moving/hiding columns. So, exactly what determines whether the CheckBox is enable or not? You would have to implement the criteria in a general manner. If you explain how you are determining whether the checknbox is enabled or not, then maybe we could suggest something.


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