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

RadTextBox repaint issue?

3 Answers 81 Views
Input
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 23 Jan 2014, 09:43 PM
I am starting off with a RadTextBox disabled and when I check a checkbox it enables the RadTextBox however it does not repaint/redraw and still looks disabled.


How would one go about fixing that?

I'm using jquery to do the enable/disable
    $('#CheckBox1').change(function () {
        if (this.checked) {
            $('#txtInput').prop('disabled', false);
        } else {
            $('#txtInput').prop('disabled', true);
        }
    });

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2014, 04:16 AM
Hi Josh,

Please try the following code snippet which works fine at my end.

JavaScript:
<script type="text/javascript">
    $('#CheckBox1').change(function () {
        if (this.checked) {
            //enable the textbox
            $('#RadTextBox1')[0].control.enable();
        } else {
            //disable the textbox
            $('#RadTextBox1')[0].control.disable();
        }
    });
 
</script>

Thanks,
Shinu.
0
Josh
Top achievements
Rank 1
answered on 24 Jan 2014, 04:28 AM
That works perfect for the RadTextBox Thanks.

When I applied the same logic to a RadComboBox it threw errors. How would I disable/enable the RadComboBox in the same function?
0
Shinu
Top achievements
Rank 2
answered on 27 Jan 2014, 03:20 AM
Hi Josh,

Please have a look into the following JavaScript code which works fine at my end.

JavaScript:
<script type="text/javascript">
    $('#CheckBox1').change(function () {
        if (this.checked) {
            $('#RadComboBox1')[0].control.enable();
        } else {
            $('#RadComboBox1')[0].control.disable();
        }
    });
</script>

Let me know if you have any concern.
Thanks,
Shinu.
Tags
Input
Asked by
Josh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Josh
Top achievements
Rank 1
Share this question
or