EasyUI Forum
April 26, 2024, 04:10:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: remove all options of combobox  (Read 7044 times)
az85
Newbie
*
Posts: 2


View Profile
« 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


View Profile Email
« 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


View Profile
« Reply #2 on: April 26, 2015, 01:05:11 AM »

Perfect, it works.
Thank you.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!