Dropdown remote binding not matching the selecteditem

Leo

Because a grid i try to implement has records with many (large) dropdownboxes, i have set them to autobind false. Now when a record is set to editmode, the dropdownbox is empty, when clicked it is populated and the appropiate item is selected. Because an empty dropdownlist is confusing the user, i'm looking for a solution where the value is displayed.

Ivan Danchev

If you want an item to be automatically selected when the user opens the dropdown, you can wire the DropDownList to the DataBound event and in its handler select an item as shown in the code snippet posted below:

function onDataBound(e) {

if (this.select() === -1) { //check whether any item is selected

this.select(0);

this.trigger("change");

}

}

Regards,
Ivan Danchev
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

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.