tags:

views:

395

answers:

1

hi. i am using an checkboslist binding to a datatable. but here i need to make user select only one item selected from checkbox list is there way we can aachive this

either JQuery, javascript, c# thank you

+8  A: 

If the user is only allowed to select one item from a list, you should use radio buttons instead of checkboxes.

UPDATE:

If you have to use checkboxes then you can use the following code:

$("#myform :checkbox").click(function(){
  $("#myform input:checked").attr("checked","");
  $(this).attr("checked","checked");
});
Guillaume Flandre
but my requirment is that i need to use checkbox list not radio button
prince23
i updated my answer with some code
Guillaume Flandre