choose only check box ?

G

Gaurav

Hi all,

I have two check boxes in my form namely "AcceptCheckBox" and the
"RejectChckBox" . basically these checkboxes are in every row of the
table
The first coloum contains the checkboxes having name as "AcceptChckBox"
and only their respective values differ.
The second colum contains the checkboxes having name as "RejectChckBox"
and only thier respective values differ.

Now, i want that .. only one of the checkboxes either "acceptchckbox"
or "RejectCheckBox" OF A PARTICULAR ROW, should be selected.

How can this be done ?

PS , dont say me to use array for checkboxes. I cant do that.
regards,
Gaurav
 
M

Michael Winter

On 22/06/2005 13:26, Gaurav wrote:

[snip]
Now, i want that .. only one of the checkboxes either "acceptchckbox"
or "RejectCheckBox" OF A PARTICULAR ROW, should be selected.

Then you should be using radio buttons. Use checkboxes when more than
one option can be selected, and radio buttons when you have a set of
exclusive options. You would need to alter the names so that they
identified with a particular row, and the value 'accept' and 'reject'
would probably be appropriate for the two different controls.

Alternatively, you could use a single checkbox that either represented
the option to accept (that is, checked means accept), or reject.

Programatically swapping the checked state of two checkboxes is not a
good idea.

[snip]

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top