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

Imprope Column Alignments on Conditional Format Rows

9 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tom Chien
Top achievements
Rank 1
Tom Chien asked on 14 Oct 2009, 01:49 AM
On Rows that have ConditionalFormattingObject's on one or more Columns, it's ignoring at least the MiddleRight (if not all) value of the TextAlignment Property and left-aligning at least the numeric (if not all types of) Columns.  I verified that the TextAlignment Property is set to MiddleRight before and after adding ConditionalFormattingObject's and before and after calling the Show method on the Form.

Telerik 2009Q2 (2009.2.9.729), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3 on Core2Duo 2.99GHZ with 3GB.


9 Answers, 1 is accepted

Sort by
0
Pawz
Top achievements
Rank 1
answered on 14 Oct 2009, 06:33 AM
I have the same issue - seems like the conditional formatting completely overwrites whatever formatting you may have had set beforehand... Like date / number formats and text alignment.


0
Tom Chien
Top achievements
Rank 1
answered on 15 Oct 2009, 09:16 PM
I think it's because the ConditionalFormattingObject's ApplyToRow Property is True and its RowTextAlignment Property is defaulted to MiddleLeft.  Is there a way tell RadGridView to ignore or override this Property or set it to a value that means Use Column's Text Alignment? 

Just because I want to show the whole Row in a different Color, doesn't mean I want to change the Alignment of the whole Row especially since Color is usually a Column-type neutral attribute and Alignment is usually a Column-type specific attribute (i.e. left for text and right for numeric / date / time).  I would expect that this is the most common use of ConditionalFormattingObject's.

0
Tom Chien
Top achievements
Rank 1
answered on 16 Oct 2009, 12:10 AM
I was able to manually implement conditional formatting using the CellFormatting Event.  However, that means the user can't add, edit or delete the formatting (unless you also implement your own Conditional Formats Editor) it and it can't be saved / loaded by SaveLayout / LoadLayout (unless you manually add / remove-interpret it before / after the calls to SaveLayout / LoadLayout ).  Getting the ConditionalFormattingObject to support changing the whole Row's color without changing its alignment or vice versa would still be the ideal solution.  What say ye, Telerik?

0
Martin Vasilev
Telerik team
answered on 16 Oct 2009, 03:00 PM
Hi guys

RowTextAlignment is applied to all cells affected by the mentioned condition if conditional formatting is set in the current version - Q2 2009. We understand that this behavior is not very convenient, and we will change it in the next release. Unfortunately, there is no easy work-around. Please, excuse us for the inconvenience.

Do not hesitate to contact us again if you have other questions.

Best wishes,
Martin Vasilev
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
Tom Chien
Top achievements
Rank 1
answered on 16 Oct 2009, 04:31 PM
Good to hear you're going to change it in the next release.  Was that initiated by my post?  If so, how about hooking me up with some points for this "Feature Request" which I haven't seen posted elsewhere?  Thanks. ;)
0
Martin Vasilev
Telerik team
answered on 22 Oct 2009, 11:47 AM
Hello Tom Chien,

Thank you for getting back to me. This is a known issue (our QA team has already discovered it) and although our policy is not to give points in these situations, I add 300 Telerik points to your account since you are a very active customer and we highly appreciate your feedback.

Regards,
Martin Vasilev
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
Tom Chien
Top achievements
Rank 1
answered on 22 Oct 2009, 07:48 PM
Why, thank you!  Very gracious of you.  I'm glad I can help.  Yay, more points!  I know, I'm a points whore. ;)
0
Tom Chien
Top achievements
Rank 1
answered on 11 Nov 2009, 10:02 PM
Thanks, I verified this has been fixed in the final release of Q3 2009.

I noticed that it appears to have been "fixed" by applying the ConditionalFormattingObject.RowTextAlignment Property when it's different from the default value (MiddleLeft).  What if we actually want all Columns on the Row to be aligned MiddleLeft?

Telerik WinForms 2009Q3 (2009.3.9.1103), VB, VS 2005 (v8.0.50727.762 SP.050727-7600), .Net 2.0 (2.0.50727), XP SP3, 3GB, 2.99GHZ, Core2Duo.
0
Martin Vasilev
Telerik team
answered on 17 Nov 2009, 01:29 PM
Hi Tom Chien,

Thank you for getting back to us.

You are correct. Currently, you cannot apply the default alignment value. We will improve this functionality in one of our next releases.

Write me back if you have any other questions.

Kind regards,
Martin Vasilev
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.
Tags
GridView
Asked by
Tom Chien
Top achievements
Rank 1
Answers by
Pawz
Top achievements
Rank 1
Tom Chien
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or