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

Conditional formatting doesn't apply after updating cell value

3 Answers 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 15 May 2008, 01:49 PM
I've set some conditional formatting on my RadGridView which works great.  However when I update a cell value, the color formatting isn't applied.  Note:  I'm using ApplyToRow = true.

I'm already calling Update() and Refresh() on the grid after each update...isn't that enough to apply the conditional formatting to the cell?

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 17 May 2008, 01:09 PM
Hi Bob,

When you update a cell value from the UI, the conditional formatting should be applied automatically. However, when you set the value by code, you should also call the Update method passing GridUINotifyAction.StateChanged as a parameter:
 
this.radGridView1.GridElement.Update(GridUINotifyAction.StateChanged); 

If you have additional questions, do not hesitate to contact me.
 

All the best,

Nikolay
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 19 May 2008, 12:58 PM
Doing that didn't seem to help.

I also tried:  Me.rgvCurrentRequests.GridElement.Update(GridUINotifyAction.DataChanged)

But when I did that, I get this error:  "Index was outside the bounds of the array."

I searched the forums and online documentation, but didn't find anything related to
GridUINotifyAction.  How do we know which enum value to use and what it does differently from the others?
0
Nikolay
Telerik team
answered on 22 May 2008, 12:34 PM
Hello Bob,

I could not reproduce the behavior you are experiencing. When I change a value using the UI, RadGridView automatically updates with the correct conditional formatting. If I change a value programmatically and use the code snippet above, RadGridView is updated correctly as well.

I demonstrated this in the sample project attached. If you continue to experience difficulties in this scenario, please open a support ticket and send me a sample project which reproduces the incorrect behavior.

As to the GridUINotifyAction, it is not included in our documentation, because the Update() method with GridUINotifyAction.CorrespondingAction given as a parameter should be called automatically, and you should not bother to call it on your own. However, currently there is an issue with the automatic update and calling the Update() method is a workaround.

If you have additional questions, do not hesitate to contact me.

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Bob
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Bob
Top achievements
Rank 1
Share this question
or