Syncfusion GridGroupControl display problem
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.
SIGN IN To post a reply.
5 Replies
AD
Administrator
Syncfusion Team
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
CheckBoxColumn_GGC.zip
KA
Kai
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
CheckBoxColumn_GGC.zip
KA
Kai
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
CheckBoxColumn_GGC.zip
AD
Administrator
Syncfusion Team
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.
KA
Kai
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.
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
KA Kai
- Mar 23, 2006 01:55 AM UTC
- Mar 24, 2006 06:15 AM UTC