EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
April 26, 2024, 04:10:42 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
remove all options of combobox
Pages: [
1
]
« previous
next »
Print
Author
Topic: remove all options of combobox (Read 7044 times)
az85
Newbie
Posts: 2
remove all options of combobox
«
on:
April 25, 2015, 08:34:16 AM »
Hello,
I need your help please.
How can I remove all options from a combobox?
I have a combobox and load the data from a remote URL.
Thats all works very well.
But I need a function, which I can remove all loaded options from the combobox.
I have already test the 'clear' and 'reset' methods, but with this methods only the value was remove. The options are still there.
Logged
jarry
Administrator
Hero Member
Posts: 2262
Re: remove all options of combobox
«
Reply #1 on:
April 25, 2015, 04:40:55 PM »
Please call 'loadData' with empty array data to clear the data items.
Code:
var cc = $('#cc');
cc.combobox('loadData', []);
Logged
az85
Newbie
Posts: 2
Re: remove all options of combobox
«
Reply #2 on:
April 26, 2015, 01:05:11 AM »
Perfect, it works.
Thank you.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...