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.

Calculated fields in Grid

Thread ID:





88732 Aug 10,2009 06:07 AM Aug 14,2009 09:51 AM ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Varuni Jayamaha
Asked On August 10, 2009 06:07 AM


I'm trying to validate a grid by using column values. For example, for Column X, all rows should add to 100%. And if the value in Column X changes, the value in Column Y needs to change accordingly. Whats the best implementation for this using the DataBoundGrid?


Lingaraj S [Syncfusion]
Replied On August 14, 2009 09:51 AM

Hi Varuni,

Thank you for your interest in Syncfusion product.

If you want to change the another column value based on the another column value then please try using CurrentCellAcceptedChanges event in GridDataBoundGrid to achive this functionality.

Refer the ode below:

this.gridDataBoundGrid1.CurrentCellAcceptedChanges += new CancelEventHandler(gridDataBoundGrid1_CurrentCellAcceptedChanges);
void gridDataBoundGrid1_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
int row=this.gridDataBoundGrid1.CurrentCell.RowIndex;
int col=this.gridDataBoundGrid1.CurrentCell.ColIndex;
if (col == 2)
this.gridDataBoundGrid1[row, 3].Text = this.gridDataBoundGrid1[row, col].Text + "Ch";

Please let me know if you have any queries.

Lingaraj S.


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.