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.

Syncfusion GridGroupControl display problem

Thread ID:

Created:

Updated:

Platform:

Replies:

42219 Mar 22,2006 08:55 PM Mar 24,2006 01:15 AM Windows Forms 5
loading
Tags: GridControl
Kai
Asked On March 22, 2006 08:55 PM

Hi, I have a DataSet with a string DataColumn which contains "S", "W", "D" values. However, when I associate the DataSource to the GGC, I would like to display this column as a CheckBox column and having the check box checked iff the value of this column equals to "D". How can I do that? Many thanks.

Administrator [Syncfusion]
Replied On March 23, 2006 02:03 AM

Hi Kai, This can be acheived by using the QueryCellStyleInfo event. Here is a demo sample which, explains how a column is replaced by CheckBox column and the value of the CheckBox column is changed according to the value in the datasource column. Let us know if this helps, Best regards, Madhan.

CheckBoxColumn_GGC.zip

Kai
Replied On March 23, 2006 02:22 AM

Great! this is exactly what I need. Many thanks! >Hi Kai, > >This can be acheived by using the QueryCellStyleInfo event. Here is a demo sample which, explains how a column is replaced by CheckBox column and the value of the CheckBox column is changed according to the value in the datasource column. > >Let us know if this helps, > >Best regards, >Madhan.

CheckBoxColumn_GGC.zip

Kai
Replied On March 23, 2006 03:21 AM

Sorry to ask again, but what if the CheckBox''s status is based on a value on a different column within the same row. How can we do that? Thanks. >Hi Kai, > >This can be acheived by using the QueryCellStyleInfo event. Here is a demo sample which, explains how a column is replaced by CheckBox column and the value of the CheckBox column is changed according to the value in the datasource column. > >Let us know if this helps, > >Best regards, >Madhan.

CheckBoxColumn_GGC.zip

Administrator [Syncfusion]
Replied On March 23, 2006 05:12 AM

Hi Kai, Thanks for the reply. Here is the code snippet, which explains a way to change the column value depend on the other columns values in a row. // In QueryCellStyleInfo event Record r = this.gridGroupingControl1.Table.DisplayElements[e.TableCellIdentity.RowIndex].ParentRecord; if(Convert.ToInt32(r.GetValue("Integer")) < 10 && Convert.ToInt32(r.GetValue("ParentID")) < 5 ) { e.Style.CellValue = true; } Let us know if you need any further assistance, Best regards, Madhan.

Kai
Replied On March 24, 2006 01:15 AM

Work as expected. Thanks. >Hi Kai, > >Thanks for the reply. Here is the code snippet, which explains a way to change the column value depend on the other columns values in a row. > > // In QueryCellStyleInfo event > Record r = this.gridGroupingControl1.Table.DisplayElements[e.TableCellIdentity.RowIndex].ParentRecord; > if(Convert.ToInt32(r.GetValue("Integer")) < 10 && Convert.ToInt32(r.GetValue("ParentID")) < 5 ) > { > e.Style.CellValue = true; > } > >Let us know if you need any further assistance, > >Best regards, >Madhan.

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.

;