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

Event on ValueChanged on DataSource GridDataBoundGrid

Thread ID:





73293 Apr 29,2008 05:04 PM UTC May 13,2008 11:34 AM UTC WinForms 1
Tags: GridControl
mattia locatelli
Asked On April 29, 2008 05:04 PM UTC

Hi all,
There is in the GridDataBoundGrid an event that is triggered when the value of an object in the dataSource is changed ?
My goal is to change the background color of a cell when the correspondent value in the dataSource is changed. The change to the dataSource are not made by the user interacting with the grid, so events like valueChanged and TextChanged are not triggered. How can I do this?

SubhaSheela R [Syncfusion]
Replied On May 13, 2008 11:34 AM UTC

Hi ML,

Thank you for using Syncfusion products.

You can achieve the desired behavior by calling CurrentCell.EndEdit() and Binder.EndEdit() methods of GridDataBoundGrid Control. By handling the PrepareViewStyleInfo event, you can set the back color of that particular row. Below is the code snippet:

this.gridDataBoundGrid1.PrepareViewStyleInfo += new Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventHandler(gridDataBoundGrid1_PrepareViewStyleInfo);

void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
if (this.gridDataBoundGrid1.CurrentCell.ConfirmChanges(true))
e.Style.BackColor = Color.HotPink;

Here is the sample:


Please have a look into the above sample and let me know if it helps.

Subhasheela R


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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