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.

Updating expression fields in GridGroupingControl

Thread ID:





49418 Sep 18,2006 04:53 PM Sep 19,2006 07:04 PM Windows Forms 2
Tags: Grouping
Michael Lorenz
Asked On September 18, 2006 04:53 PM


I''m trying to do something fairly basic, but can''t find the documentation on how to do it.

I''m using a GridGroupingControl (bound to an underlying DataTable), and I''d like to have certain columns on a row update depending on values entered into another column. In the attached screenshot, I can modify the target %. The progress bar depends on a calculation involving that target % (so I''m using an ExpressionFieldDescriptor), and I''d like it to reflect the new values whenever the target % is changed.

In the account targets groupbox above the grid, I have three textboxes which show a sum of the values in the grid. These numbers should also change whenever a target % is modified in the grid.

What listeners or other method calls do I need to set up for this? And why don''t the epxression fields automatically pick up the changes in the grid?

If you have a working code example or can point me to where this is already explained, I''d appreciate it.



Administrator [Syncfusion]
Replied On September 19, 2006 06:05 AM

Hi Michael,

The reason is that you are not setting the ProgressBar.ProgressValue property in a ProgressBar cell. The ExpressionFields does set the CellValue depending on values entered into required column in a Table (It doesn''t set the ProgressBar.Progress property). For changing the ProgressBar cell display value, you need to set the ProgressBar.ProgressValue property in the QueryCellStyleInfo. Below is a code snippet.

private void gridQueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if( e.TableCellIdentity.Column != null && e.TableCellIdentity.Column.Name == "Expression" && e.Style.CellType == "ProgressBar")
if( e.Style.CellValue != null)
int progressValue = int.Parse(e.Style.CellValue.ToString());
e.Style.ProgressBar.ProgressValue = progressValue;

Sample : http://www.syncfusion.com/Support/user/uploads/ExpressionProgressBar_38d946a4.zip

Let me know if you are looking something different.

Best Regards,

Michael Lorenz
Replied On September 19, 2006 07:04 PM

Hi Haneef,

That was pretty much it, yeah. Your clarification also helped me get rid of another weird behaviour, where only alternate rows were getting updated properly. ;-)

Thanks a lot,


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.