This is a migrated thread and some comments may be shown as answers.

Change column color in Radgridview

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Reena
Top achievements
Rank 1
Reena asked on 05 Oct 2010, 10:42 AM
Hi

 Am using Radgridview control. Am not able to change  color for  a particular cell after editing the column value.

 Am using this code in cellValidating event.

                if (e.OldValue != e.NewValue)
                {
                    e.Cell.Background = Brushes.Green;
                }

The color is not changed :(

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 07 Oct 2010, 02:32 PM
Hello Reena,

In order to change the cell background and any other properties that the GridViewCell exposes in   CellValidating event use the following markup:
private void RadGridView_CellValidating(object sender, Telerik.Windows.Controls.GridViewCellValidatingEventArgs e)
{
    e.Cell.Background = Brushes.Black;
}


Sincerely yours,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Reena
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or