Sorting of group boxes

0
Hi, Did anyone have any idea like how can I sort group boxes which contains list view in it. I have tried Group box helper widgets but those don’t allow list views in it and I have also tried CSS ”webkit user drag”  here I’m able to drag but not drop. any jQuery also helps here. Thanks in advance!
asked
1 answers
6

Hi Anusha Malla,

You can use below jquery to sort the group box based on the content

You have to put group box inside the container and add the call parent to it

inside that add groups with class child.

 

$(document).ready(function () {
var mylist = $('.parent');

var listitems = mylist.children('.child').get();

listitems.sort(function(a, b) {
   return $(a).text().toUpperCase().localeCompare($(b).text().toUpperCase());
});

$.each(listitems, function(index, item) {
   mylist.append(item); 
});
});

 

 

Thanks.

answered