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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syncfusion GridGroupControl display problem

Thread ID:

Created:

Updated:

Platform:

Replies:

42219 Mar 23,2006 01:55 AM UTC Mar 24,2006 06:15 AM UTC WinForms 5
loading
Tags: GridControl
Kai
Asked On March 23, 2006 01:55 AM UTC

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 07:03 AM UTC

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 07:22 AM UTC

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 08:21 AM UTC

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 10:12 AM UTC

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 06:15 AM UTC

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.

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

;