[eluser]paulopmx[/eluser]
[quote author="Armorfist" date="1207576959"]Thanks.
I initially tried the toggle, but if you make some selections before you click "Select All", the toggle un-selects those selections, and selects the others. So it doesn't work for me.[/quote]
You just need to add conditions if you want it to act that way.
Code:
if (com=='Select All')
{
if ($('.trSelected',grid).length!=$('.bDiv tbody tr',grid).length)
$('.bDiv tbody tr',grid).addClass('trSelected');
else
$('.bDiv tbody tr',grid).removeClass('trSelected');'
}