tags:

views:

69

answers:

1

Hello,

i have grid with user data.with first column has check box.. i have a button at the top of the gird..if i click button I need to selct top 5 users from the list? can anybody tell me how to do this using jquery?

thanks

+2  A: 
$('#myButton').click(function() {
    $('#Grid input[type=checkbox]:lt(5)').attr('checked','checked');
});

If you have other checkboxes in the grid, there may be in issue. This is the best I can do without seeing your HTML.

patrick dw
thanks this what i am looking for
kumar