• enriquezreyjoseph (10/4/2013)


    Sean Lange (10/4/2013)


    I will go one step further and think outside the checkbox. 😉

    You seem to have 3 checkboxes that you want to allow only one of them to be selected at a time. I would suggest that you are using the wrong control here. Try using a radio button group instead. You can add a 4th option to the group for "None" which will simulate having none of them checked.

    Hi Sean

    Yes, right before you suggested it to use radio button, i already think of it, BUT i want checkboxes to behave like radio button(thou it seem stupid but i have my own reason why i am using it)

    Using check boxes in this case is using the wrong tool for the job. You are making this a lot harder on yourself than you need to. Look at all the code you have already had to write just to deal with the fact that you are using a series of check boxes for a mutually exclusive decision.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/