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.

Disabling Checkboxes in a GridGroup?

Thread ID:





18931 Sep 14,2004 12:09 AM Sep 14,2004 05:32 PM Windows Forms 2
Tags: Grouping
David Llewellyn
Asked On September 14, 2004 12:09 AM

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 02:39 AM

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 05:32 PM

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.

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.