For those wanting to remove the default width on RadTextBoxes (or in my case RadNumericTextBoxes) you've probably come across this outdated solution. Here's the updated method that I used to solve this problem:
Attach this to the client OnLoad event and you should be good to go.
(I'll leave it up to Telerik to update the Code Library and/or correct my solution.)
function
RemoveWidth(sender, args) {
sender.get_wrapperElement().style.removeProperty(
"width"
);
}
Attach this to the client OnLoad event and you should be good to go.
(I'll leave it up to Telerik to update the Code Library and/or correct my solution.)
5 Answers, 1 is accepted
0
Hi Matthew,
If you just remove the width of the wrapper element it will be applied again when the input change it's state(enabled,hovered,error state etc.) So I would suggest to use the code from our Code Library.
Regards,
Vasil
Telerik
If you just remove the width of the wrapper element it will be applied again when the input change it's state(enabled,hovered,error state etc.) So I would suggest to use the code from our Code Library.
Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Matthew
Top achievements
Rank 1
answered on 24 May 2013, 03:23 PM
I haven't had any issues with state changes. I have skinned the button, but I don't think I changed anything for error state, and that doesn't mess it up. In case I wasn't clear, I tried the solution in the Code Library--it does nothing. Rather literally, too. I stepped through with Firebug and the originalTextBoxCssText is an empty string before I even try to strip away the width.
0
Hello,
It is used in IE7 to correct some browser problems, actually if you use only modern browsers, the property will not be used.
Regards,
Vasil
Telerik
It is used in IE7 to correct some browser problems, actually if you use only modern browsers, the property will not be used.
Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Matthew
Top achievements
Rank 1
answered on 28 May 2013, 02:38 PM
Thank you. Yes, IE7 is not one of my target browsers. So looking at the Code Library sample I linked to above, is the javascript solution current? It wasn't working for me, so I'm inclined to think it's out of date. Could you double-check that, please? Thanks.
0
Hi Matthew,
Thank you for your feedback, we will double check the Code Library and correct it if needed.
Regards,
Vasil
Telerik
Thank you for your feedback, we will double check the Code Library and correct it if needed.
Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.