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.
ADAdministrator Syncfusion Team 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://184.108.40.206/Support/article.aspx?id=10351
RERebeccaDecember 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.
ADAdministrator Syncfusion Team 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.