how assign hight to RadTextBox in percentage

4 posts, 0 answers
  1. Rahul
    Rahul avatar
    39 posts
    Member since:
    Jan 2014

    Posted 04 Jan 2014 Link to this post

    Hi,
    how apply the hight to Radtexbox in percentage not a pixcel. Please explain it with example.

    Kind Regards,
    Rahul
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Jan 2014 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rahul
    Rahul avatar
    39 posts
    Member since:
    Jan 2014

    Posted 06 Jan 2014 Link to this post

    HI Princy,
                          I checked this code and implemented in my  project but it's not work. so share any other source.

    Thanks,
    Rahul
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Jan 2014 Link to this post

    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.
Back to Top