hi.

please help..

how can i disable other check boxes when the user already checked 5 checkboxes?

i have a grid view that is filled from database with checkboxes as template filed on the first column,
then, user must choose only five records through checkbox.and when its already 5,
all other checkboxes on the gridview will be disabled from clicking.
Only when the user unchecked checkboxes, those disabled ones eill be enabled again.

thanks.

im using vb..asp. :-)

Since you mentioned the gridview control, I'm assuming asp.net not asp, correct?

Also, I suspect that you'll want to handle this client side? In other words, do you want to control this process from the user's browser or were you going to attempt to handle this server side which would require a post back each time the user clicks on a checkbox.

Client side, you should be able to handle this via javascript/jQuery. However, without seeing the relevant HTML generated code, hard to say how to go about implementing a solution.

In so many occasions I have had a use for a grid-based checkbox selector. I'm sure you've all seen them, you select the checkbox at the top of the grid, and all children checkboxes are either checked or unchecked,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.