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

Update UI after datasource loaded?

1 Answer 90 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Samuel
Top achievements
Rank 1
Samuel asked on 12 May 2015, 03:15 PM
<div>
        @using (Html.BeginForm("SignIn", "Account",  FormMethod.Post,  new { @class = "form-horizontal", role = "form", autocomplete="off" }))
        {
            @Html.AntiForgeryToken()
            <dl class="dl-horizontal">
                <dt>
                    @Html.LabelFor(x => x.UserName)
                </dt>
                <dd>
                    @Html.TextBoxFor(x => x.UserName, new {@id="user_name", @disabled="true"})
                </dd>
                <dt>
                    @Html.LabelFor(x => x.Password)
                </dt>
                <dd>
                    @Html.PasswordFor(x => x.Password, new {@id="password", @autocomplete="off" , @disabled="true"})
                </dd>
                <dt>
                    @Html.LabelFor(x => x.StoreNum)
                </dt>
                <dd>
                    @(Html.Kendo().DropDownListFor(x => x.StoreNum)
                    .DataSource(ds => ds
                    .Read(r=> r.Action("GetStoreList", "Account")))
                    .HtmlAttributes(new {@id="store_list",@disabled="true" })
                    )
                </dd>
                <dd>
                    <input type="submit" value="Log in" class="btn btn-default" disabled="true" id="login_button" />
                </dd>
            </dl>
           
        }
    </div>

 

I have a drop down list that reads data from my controller.  I need to enable fields and a button in the UI after the data is loaded into the dropdownlist.  How can I do this?

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 13 May 2015, 09:00 AM

Hello Samuel,

 

There is an event called dataBound that will be raised, when the widget has finished loading its data. You can use this event to perform your actions. More information is available here:

 

http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#events-dataBound

 

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DropDownList
Asked by
Samuel
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or