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.

"gray" a checkbox in runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

22733 Dec 20,2004 05:38 PM Dec 22,2004 02:14 AM Windows Forms 3
loading
Tags: GridControl
Rebecca
Asked On December 20, 2004 05:38 PM

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 03:10 AM

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. http://64.78.18.34/Support/article.aspx?id=10351

Rebecca
Replied On December 21, 2004 08:24 PM

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 02:14 AM

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.

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.

;