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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change cells .Enabled property at runtime

Thread ID:





22365 Dec 10,2004 01:10 PM UTC Dec 10,2004 02:18 PM UTC WinForms 1
Tags: GridControl
Asked On December 10, 2004 01:10 PM UTC

Hi, I want to set a cells .Enabled property to false when a user clicks on a checkbox within a different cell. Thanks Iain

Administrator [Syncfusion]
Replied On December 10, 2004 02:18 PM UTC

If this is a non-virtual GridControl, you can use the grid.CheckBoxClick event. In your handler, you can set the grid[row, col].Enabled = false for the cell you want to disable. If this is a GridDataBoundGrid (or a virtual GridControl), you cannot do this. Instead you should handle the grid.Model.QueryCellInfo event. In the handler, check e.RowIndex and e.ColIndex. If they point to a cell that you MAY want to disable, then get the value of the checkbox useing grid[e.RowIndex, checkBoxColIndex].CellValue. Then use this value to decide whether to set e.Style.Enabled = false for the cell that e.RowIndex and e.ColIndex point to.


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