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

Auto capitalize input

3 Answers 66 Views
Input
This is a migrated thread and some comments may be shown as answers.
Senthil
Top achievements
Rank 1
Senthil asked on 12 Aug 2013, 06:04 PM
Hi Community

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

Thankyou
Senthil

3 Answers, 1 is accepted

Sort by
0
Accepted
A2H
Top achievements
Rank 1
answered on 12 Aug 2013, 07:22 PM
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
0
Senthil
Top achievements
Rank 1
answered on 13 Aug 2013, 02:08 PM
Thanks it works.
I am setting the control to autopostback. How can I prevent a postback if textbox is empty?
0
Accepted
Princy
Top achievements
Rank 1
answered on 13 Aug 2013, 02:12 PM
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.
Tags
Input
Asked by
Senthil
Top achievements
Rank 1
Answers by
A2H
Top achievements
Rank 1
Senthil
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Share this question
or