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

how assign hight to RadTextBox in percentage

3 Answers 78 Views
Input
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 05 Jan 2014, 05:48 AM
Hi,
how apply the hight to Radtexbox in percentage not a pixcel. Please explain it with example.

Kind Regards,
Rahul

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Jan 2014, 04:17 AM
Hi Rahul,

As far as I know it is not possible to set the RadTextBox height in percentage. Please have a look into this forum thread which deals the same scenario.

Hope this will helps you.
Thanks,
Princy.
0
Rahul
Top achievements
Rank 1
answered on 07 Jan 2014, 04:53 AM
HI Princy,
                      I checked this code and implemented in my  project but it's not work. so share any other source.

Thanks,
Rahul
0
Princy
Top achievements
Rank 2
answered on 07 Jan 2014, 10:36 AM
Hi Rahul,

As i already mentioned it is not possible to set the RadTextBox height in percentage. As a work around please try the following code snippet which works fine at my end.

ASPX:
<telerik:RadTextBox runat="server" ID="RadTextBox1" TextMode="MultiLine" Text="Test"
    Height="100%" ClientEvents-OnLoad="OnLoad" />

JavaScript:
<script type="text/javascript">
    function OnLoad(sender) {
        var value = parseInt(document.getElementById('RadTextBox1').clientHeight)+parseInt(30);
        sender._originalTextBoxCssText = "height:" +value + "px";
        sender.updateCssClass();
    }
</script>

Thanks,
Princy.
Tags
Input
Asked by
Rahul
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rahul
Top achievements
Rank 1
Share this question
or