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.

Change cells .Enabled property at runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

22365 Dec 10,2004 08:10 AM Dec 10,2004 09:18 AM Windows Forms 1
loading
Tags: GridControl
Iain
Asked On December 10, 2004 08:10 AM

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 09:18 AM

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.

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.

;