Detect Shift or Control Click

I am trying to implement a screen similar to a windows listbox multiple-item selection (ctrl or shift click).  On windows, I can select non-continuous items by holding down the control key.

On my ASP.NET page,  I have a datagrid with a checkbox in a column that allows me to select multiple items.  Right now, I can get everything to work, but in order to start a new selection, I have to de-select everything that was previously selected.  I know I can clear the other checkboxes when the user checks off something else.  If I do this, is there anyway to detect a control click or a shift click so that I can determine whether or not to clear previously checked items or if I should allow multiple items to be selected.

I don't know if this is possible, but I'd just thought I'd ask.  If this is not possible, what would be the best way to implement a multiple item selection in a datagrid?
ardolinoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EBatistaCommented:
check out this free custom control, it will do the job for you:
http://www.metabuilders.com/Tools/RowSelectorColumn.aspx

regards
0
ardolinoAuthor Commented:
I already have something like this and its working.  I need to know if you can detect a control click or a shift click from the web.  The problem with this control is that the user has to deselect the items after selecting them and performing an action on them.  I would prefer that the checkboxes work like the radio boxes UNLESS the user clicks on them with the control or the shift key.
0
EBatistaCommented:
mmm...i've never tackled what you want, but if there is a way to accomplish that, it will be using client side javascript.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

EBatistaCommented:
mmm...i've never tackled what you want, but if there is a way to accomplish that, it will be using client side javascript, discard pure server code solution here.
0
ardolinoAuthor Commented:
Ok, so now my question is... how?
0
armoghanCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ardolinoAuthor Commented:
Thank you.  This is exactly what I wanted.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.