Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

i applied sorting on gridview using table sorter plugin in jquery.

my gridview has alternating row style property when i applied sorting then
alternating row style get messed up. i googled a lot but problem sustain.

please help.any answer will be appricated.

thanks
Posted

hi gupta

after sorting once repaint the gridview style

first remove the style and then add the style

like below

$('gridid').removeclass('cssclassname')
$('gridid').addclass('cssclassname')

Happy coding ....... :)

seshu
 
Share this answer
 
Use the zebra widget:

JavaScript
$(document).ready(function () {
    var grid = "#" + "<%= gvwLand.ClientID %>";
    $(grid).tablesorter({
        widgets: ['zebra'],
        headers: {
            0: { sorter: false },
            9: { sorter: false }
        }
    });
    $('.tablesorter tr').mouseover(function () {
        $(this).addClass("over");
    });
    $('.tablesorter tr').mouseout(function () {
        $(this).removeClass("over");
    });
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900