Search code examples
jqueryjquery-easyui

remove data from jquery easyui combobox


I'm using the jQuery EasyUI Combobox to present a list of data. Is there any way I can remove a particular line from my jQuery EasyUI combobox list with a jQuery EasyUI function or something?


Solution

  • Hello i didn't find special function for that in EasyUI Combobox, but you can use JQuery selectors

    this is the way to delete selected item:

    $('.combobox-item-selected').remove(); // Remove selected item
    $('.combo-text').val(''); // clear a textfield
    

    this is the way to delete any item by unique value using selectors:

    $('div[value="ND"]').remove(); // Where ND is unique value
    

    i tried this code in this demo of EasyUI Combobox

    Greetings