
I'm using the FormDecorator inside the grid.
Everything seems to work fine, Firefox renders the boxes as it should (maximum with) but unsing Internet Explorer the width of the textboxes are dynamically adjusted to the content. This means textboxes with no content (empty form for adding a new record) are only about a few pixels in width which makes it almost impossible to use the form.
I adjusted the width of the textboxes using:
style="width: 100%;" |
but that doesn't do the trick.
Best Regards,
Andreas
7 Answers, 1 is accepted

But my design uses dynamic with, so I would need a possibility to set the with of the textboxes dynamically as a percentage-value as well (textbox must be as wide as the space of the table-cell that's in).
For the time being it is not possible to use percents when setting width of decorated textboxes and textareas.
Our only suggestion is to turn decorating of textboxes off.
Regards,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

How would I turn off the decoration just for the textboxes? As far as I know I'm only able to turn decoraton ON for some specific controls (all or one specific).
Decorating textboxes is not enabled by default.
You probably set DecoratedControls = "All" explicitly.
To fine tune the setting you should provide a comma separated list of the elements you want separated, e.g.
DecoratedControls = "CheckBoxes, Buttons,Scrollbars" etc.
Greetings,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

The question rather ruins the FormDecorator for my uses.
Thank you
Currently this is not possible, but once IE8 which will have some extra CSS capabilities is out, we will move in this direction as well.
Regards,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

What I do is capture the document width and set the various textboxes style width; that seems to do the trick.
By default I implement the pageLoad function which is equilvalent to the server side Page_Load, but for the client. I also set the window.resize = pageLoad to capture window resizes. This works for me, but then again I only have few textboxes to change.
<script type="text/javascript">
window.onresize = pageLoad;
function pageLoad() {
window.setTimeout(
function()
{
var width;
if (typeof (window.innerWidth) == 'number') {
width = window.innerWidth;
}
else if (document.documentElement &&
(document.documentElement.clientWidth ||
document.documentElement.clientHeight)) {
width = document.documentElement.clientWidth;
}
else if (document.body &&
(document.body.clientWidth ||
document.body.clientHeight)) {
width = document.body.clientWidth;
}
// get the textbox or maybe loop through your list of textboxes and set them
var textBox= $get("TextBox");
if (textBox) {
// the width may need to be biased
textBox.style.width = width+
"px";
}
}, 100);
}
</script>
Hope that helps,
Bruce