Auto capitalize input

4 posts, 2 answers
  1. Senthil
    Senthil avatar
    7 posts
    Member since:
    Aug 2013

    Posted 12 Aug 2013 Link to this post

    Hi Community

    Does radinput support auto capitalization of input? Any property that can be set to capitalize the input?

    Thankyou
    Senthil
  2. Answer
    A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 12 Aug 2013 Link to this post

    Hello,

    Please try the below implementation

    1) Set the css style for RadTextBox
    <telerik:RadTextBox ID="RadTextBox4" runat="server" style="text-transform:uppercase">
                        </telerik:RadTextBox>



    Thanks,
    A2H
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Senthil
    Senthil avatar
    7 posts
    Member since:
    Aug 2013

    Posted 13 Aug 2013 Link to this post

    Thanks it works.
    I am setting the control to autopostback. How can I prevent a postback if textbox is empty?
  5. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Aug 2013 Link to this post

    Hi Senthil,

    Please try the following code snippet.

    ASPX:
    <telerik:RadTextBox ID="RadTextBox1" runat="server" AutoPostBack="True">
        <ClientEvents OnValueChanged="PreventPostBack" />
    </telerik:RadTextBox>

    JavaScript:
    <script type="text/javascript">
        function PreventPostBack(sender, eventArgs)
        {
            if (eventArgs.get_newValue() == "")
                eventArgs.set_cancel(true);
        }
    </script>

    Thanks,
    Princy.
Back to Top