Looking at
the documentation[
^], you need to call the
selectAll
method:
$('#<%=lstBoxTest.ClientID%>').SumoSelect({selectAll:true})[0].sumo.selectAll();
However, this will overwrite the user's selection every time they press the button. You'll want to make sure you only call the
selectAll
method on the first load, or when no items are selected. For example:
$(function(){
var list = $('#<%=lstBoxTest.ClientID%>');
list.SumoSelect({selectAll:true});
if (!list.find("option:selected").length) {
list[0].sumo.selectAll();
}
});