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

Reset a DropDownList with AutoBind = false

1 Answer 235 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 25 Apr 2013, 12:20 PM
I have several DropDownLists on a page that all have AutoBind = false and set to query a remote data source.

The results shown in each DropDownList will be dependent on values chosen in the other DropDownLists, therefore in the change event I want to "reset" all the other dropdownlists, so that if they have already been bound the next time they are dropped down they will requery the remote dataSource. 

I've managed to get the other dropdownlists to requery, but at the moment they all requery straight away, whereas I want them to wait until the user drops them down. 

Is there a way to tell a DropDownList/DataSource that it should be cleared/reset, but not rebind yet, rather using the same behaviour as AutoBind=False?

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex
Top achievements
Rank 1
answered on 25 Apr 2013, 12:45 PM
The answer appears to be here (I knew I'd find it as soon as I'd posted the question!)
http://www.kendoui.com/forums/permalink/aq4dmqfYUEOngaZ8i18vYg

basically just call:
ddl.dataSource.data({}); // clears dataSource
Tags
DropDownList
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
Share this question
or