hello,
I’m filling the listbox dynamically, sorting items into to groups (let’s say group “1” and group “2”), but the following code (it is just example):
source = []
$("#listbox").jqxListBox({ source: source, checkboxes: true, width: 350, height: 250, theme: theme });
var item1 = {
label: "A",
group: "1"
}
$("#listbox").jqxListBox('addItem', item1);
var item2 = {
label: "B",
group: "2"
}
$("#listbox").jqxListBox('addItem', item2);
var item3 = {
label: "A",
group: "1"
}
$("#listbox").jqxListBox('addItem', item3);
doesn’t work, it puts everything (A,B,C) in just one group (“1”). I tried several workarounds, but none of them seems to work. Any idea?
//edit: I guess I’d have to manually (with cycle or stg) determine which is the last item in specific group, remember its index and then insert my desired item to that position?