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 Checkboxes in a GridGroup?

Thread ID:





18931 Sep 14,2004 04:09 AM UTC Sep 14,2004 09:32 PM UTC WinForms 2
Tags: Grouping
David Llewellyn
Asked On September 14, 2004 04:09 AM UTC

Hello, Is there any way in which I can query and change the enable/disabled status of a check box that is part of a datarow, being listed on a grouping grid? Thanks, David.

Administrator [Syncfusion]
Replied On September 14, 2004 06:39 AM UTC

You can use QueryCellStyleInfo to dynamcially set style properties on a cell. Here is a little snippet that disables the checkbox when the value of Col1 in the same row is no.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
	if(e.Style.CellType == "CheckBox")
		GridRecordRow rec = this.gridGroupingControl1.Table.DisplayElements[e.TableCellIdentity.RowIndex] as GridRecordRow;
		if(rec != null)
			DataRowView dr = rec.GetData() as DataRowView;
			if(dr != null && dr["Col1"].Equals("no"))
				e.Style.Enabled = false;

David Llewellyn
Replied On September 14, 2004 09:32 PM UTC

Hello. Just wanted to let you know that that code worked perfectly for that problem. Cheers again.


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