Hi Abu,
When I click a button that calls jscript what is the call to turn multiselect on or off?
Thanks
Glenn
2 Answers
There is no built-in function to do this. However, you can toggle the checkbox of multiselect using jquery code.
Use this code. This will toggle column display and selection function as well.
<input type=”button” value=”Multiselect” onclick=”toggle_multiselect()”>
<script>
function toggle_multiselect()
{
if ($(‘#list1 .cbox:visible’).length > 0)
{
$(‘#list1’).jqGrid(‘hideCol’, ‘cb’);
jQuery(‘.jqgrow’).click(function(){ jQuery(‘#list1’).jqGrid(‘resetSelection’); this.checked = true; });
}
else
{
$(‘#list1’).jqGrid(‘showCol’, ‘cb’);
jQuery(‘.jqgrow’).unbind(‘click’);
}
}
</script>
Your Answer