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

Disable combo box after ajax load

1 Answer 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Vladica
Top achievements
Rank 1
Vladica asked on 29 Aug 2013, 12:22 PM
Hi, 

I use asp.net mvc helper to define combo boxes. I have 3 of them and the are all cascading. What I need is a way to disable them after their datasources are  loaded (this is some edit functionality). 
I try to use databound event handler but enable is not working, even more, it seems that control is automatically enabled after databound event is fired. 
Can you please suggest some workaround?

Regards,
Vladica

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 30 Aug 2013, 03:23 PM
Hi Vladica,

You can disable the ComboBox using the dataBound event and call the widget's enable method after 100 ms as shown below:
@(Html.Kendo().ComboBox()
    .Events(e=>e.DataBound("disableComboBox"))
function disableComboBox(e) {
    setTimeout(function () {this.sender.enable(false)}.bind(this), 100);
}


 

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ComboBox
Asked by
Vladica
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or