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

Disabling a checkbox cell in GDBG

Thread ID:





20791 Oct 26,2004 02:01 AM UTC Oct 26,2004 05:21 AM UTC WinForms 1
Tags: GridControl
Asaf Segal
Asked On October 26, 2004 02:01 AM UTC

Hi How can I disable a specific cell that shows a check box in GDBG. For example I want to bind a GDBG to a table that has two Boolean columns B1 and B2. I want that in a specific rowX I will have the next rule: The cell of rowX.B2 is enabled if the value of rowX.B1 is true. 10x Asaf

Administrator [Syncfusion]
Replied On October 26, 2004 05:21 AM UTC

You can subscribe to the grid.Model.QueryCellInfo event. In your handler, try code like below to disable the B2 cell when B1 is false.
if(e.ColIndex > 0 && e.RowIndex > 0)
	int col = this.grid.Binder.NameToColIndex("B2");
	if(col == e.ColIndex)
		col = this.grid.Binder.NameToColIndex("B1");
		object o = this.grid[e.RowIndex, col].CellValue;
		if(o != null && !(bool)o)
			e.Style.Enabled = false;


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