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

Change the background color of gridview cell dynamically

3 Answers 228 Views
GridView
This is a migrated thread and some comments may be shown as answers.
rajeev kumar
Top achievements
Rank 1
rajeev kumar asked on 15 Jan 2010, 09:24 AM
Hi,
  I have a telerik gridview control in wpf. I want to highlight the cells, which are going to be edited. I have a CellValidating eventhandler, inside the event I have written the code >

               GridViewCell cell = e.Cell;
                cell.Background = Brushes.Red;

Then also, the color of cell is not changing. Can any one please help me to resolve this issue. Thanks in advance..

Regards,
Rajeev Kumar

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 20 Jan 2010, 01:10 PM
Hi rajeev kumar,

I have made a few tests here. Using your code I was able to change the cell background.
Maybe I am missing something ?

Please find the test project attached.

Kind regards,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
rajeev kumar
Top achievements
Rank 1
answered on 28 Jan 2010, 09:00 AM

 

Hi Pavel,
        Thank you for ur response.I am able to change the cell background only if I am moving my cursor to same row of grid after editing the cell.If I am moving to different row of grid after editing cell, the CellValidating event is firing, but no change in background of edited cell.If I am moving to  different row, the changed background of cell is disappearing.I want background of all edited cells should change.So, please give solution.


Regards,
Rajeev
0
rajeev kumar
Top achievements
Rank 1
answered on 02 Feb 2010, 06:49 AM

 

 

Hi Pavel,
        It is urgent. Please provide solution.

Regards,
Rajeev
Tags
GridView
Asked by
rajeev kumar
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
rajeev kumar
Top achievements
Rank 1
Share this question
or