Check items

2 posts, 0 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 17 Nov 2011 Link to this post

    I have a requirement that when the user check the checkbox he should not be able to check the other items.i want this from client side.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Nov 2011 Link to this post

    Hello,

    You can try the following javascript.
    JS:
    <script type="text/javascript">
     function OnClientItemChecking(sender, args)
        {
          if (sender.get_checkedItems().length == 1)
           {
            args.set_cancel(true);
           }
        }
    </script>

    Thanks,
    Princy.
Back to Top