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

Unbound Grouping Issues

I am currently using a GridGroupingControl, and grouping my rows based upon an Unbound Column. I was wondering if there is a way for me to reset the value in that column, outside of the QueryValue event.

I have tried to first clear the GroupedColumns and then re-add that column, but the issue with this is that none of the groups stay expanded afterwards. Is it possible to use this method and somehow preserve the expanded groups?

Thanks

Michael

3 Replies

HA haneefm Syncfusion Team July 16, 2007 06:59 PM UTC

Hi Michael,

You can use the Record.SetValue() method to change the unbounded column value of the record in a grid. Below is a code snippet.

this.grid.Table.Records[1].SetValue("UnBoundColumnName","Value");//Set the value of unbound column

See the forum thread for persisting the expanded group levels in a grid.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=29909

Best regards,
Haneef


MS Michael Sabin July 16, 2007 07:01 PM UTC

Never mind, I figured out how to do this...

1. Before the change, iterate through the Groups in the grid.Table.Engine.GroupingControl.Table.TopLevelGroup
2. For each Group, use the IsExpanded property to see if is expanded.
3. Reset the GroupedColumns
4. Iterate throught the groups again, and set the IsExpanded property


MS Michael Sabin July 16, 2007 07:02 PM UTC

OK, thanks

>Hi Michael,

You can use the Record.SetValue() method to change the unbounded column value of the record in a grid. Below is a code snippet.

this.grid.Table.Records[1].SetValue("UnBoundColumnName","Value");//Set the value of unbound column

See the forum thread for persisting the expanded group levels in a grid.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=29909

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon