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

Issues decorating Fieldsets and Panels

3 Answers 120 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
TonyG
Top achievements
Rank 1
TonyG asked on 19 Aug 2009, 11:02 PM
I think my basic issue is that I have no idea how the RadFormDecorator is supposed to do its magic. It's a little black box that is supposed to do neat things but when it doesn't work we're sort stuck in the cold. I'd like to find documentation that explains for v2009.2.701.20 exactly how RadFormDecorator customizes the styles for specific controls for specific browsers. The problem I keep having is that various controls don't render properly and I feel I have no control over them. I don't like feeling helpless when it comes to code.

"How about an example" you ask?
Please go to http://drop.io/TonyGFiles and download a PDF called "Telerik Group Rendering.pdf".  (Anyone have a better idea for making files and/or images available in this forum?)  That document has screen shots and code that show how FieldSets and ASP Panels render with and without RadFormDecorator.  Perhaps with this as a base we can see what it will take to style a group box, and that information may translate to other controls.

If the solution is to simply not use the RadFormDecorator, I can do that, and use custom CSS to style various controls.  But that seems a waste when here is a component designed to do this very thing.  I'd prefer that out of this discussion we'll get some better documentation and/or fixes to the component.

Thanks for your time.

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 Aug 2009, 12:31 PM
Hello Tony,

The problem here comes from the absolute positioning that you are using. RadFormDecorator is intended to be used from average users who normally do not do advanced styling using absolute positioning which can be quite tricky in certain scenarios.
And yes, you are right - it is indeed meant to be a black box because of the numerous hacks it uses that target different browsers. For example your screenshots are from IE but if you examine FF or Safari, you will get completely different look. It is not possible to document these hacks as they change over time and they are not meant to be know to average users. You could check this blog post for example. As you can see we just changed the styling of checkboxes and radio buttons only in Safari / Chrome because we found out that it can be improved due to some supported CSS settings. These are changes that happen quite often and the goal is to keep the control simple to use.
In conclusion, the decorator works fine in "common" scenarios and greatly eases the work of the average developer. In certain, more advanced scenarios however, it might be better to disable the decoration for elements that don't look good (you could use ControlsToSkip for that purpose) or not to use the decorator on such page.

I hope this information helps.

Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
TonyG
Top achievements
Rank 1
answered on 21 Aug 2009, 04:32 AM

Georgi - thanks for your very helpful response. This is a very interesting perspective. I can accept not knowing what goes on inside the black box, as that's the nature of working with binary-only components. I hate this comment from my own clients, but "all I want is for it to work". :) Seriously, it seems the only way we can find out whether this component is going to work is to try it and see, then ask when it doesn't. That's a very unprofessional way for us in the field to go about the activity of development. So in general I will ask Telerik to improve the set of information available about what this component is expected to do, and not, under various circumstances.  As an example, I'm now not sure if another issue I reported a while back is related to this issue, where maybe control positioning might have affected the way the controls were decorated by CSS:
http://www.telerik.com/community/forums/aspnet/general-discussions/minor-cross-browser-issues.aspx

With regard to my specific examples, I understand that different browsers will look different, but "all I want is" a consistent, expected look for all browsers, even if it is different between them. In other words, this browser will have rounded corners and that one will not, but if it's consistent I don't really care.

About the absolute addressing, are you suggesting that rather than this:

<div>
<fieldset style="width: 267px; height: 120px; top:155px;left:33px;position:absolute;"><legend...>

we use a pattern more like this?
<div style="width: 267px; height: 120px; top:155px;left:33px;position:absolute;">
<fieldset><legend...>
Or is the problem with labels nested within this control?  I can deal with wrapping controls in div's for positioning rather than letting them do their own positioning.

Kind regards.

0
Georgi Tunev
Telerik team
answered on 24 Aug 2009, 12:57 PM
Hi Tony,

We will consider adding such information in the future. As for your current issue, I suggest to open a support ticket and to send us a small sample project that shows your exact setup and layout along with the CSS used that reproduces the problem. This way we will have a better view over your case and we will do our best to provide you with an appropriate solution for RadFormDecorator if possible.


Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
FormDecorator
Asked by
TonyG
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
TonyG
Top achievements
Rank 1
Share this question
or