Click here to Skip to main content
12,943,701 members (55,702 online)
Rate this:
Please Sign up or sign in to vote.
See more:

how can I prevent users from selecting the same row at the same time in a grid view ( 2.0)? If somebody selects the row which has already been selected by another user, I would like to display a message saying "The row you selected is currently viewed by User" or change the row color to red.

Please help me.
Posted 25-Dec-10 0:54am
Updated 25-Dec-10 1:01am
JF2015 25-Dec-10 7:01am
Corrected minor spelling and grammar errors.
Marking my answer with a 1 simply because I told you something you don't want to hear is beyond stupid. Your question isn't worded well at all, so we have to make a guess as to what you're after. Edit your question to include more info, and I'll edit my answer to give you more appropriate info.
Marcus Kramer 25-Dec-10 21:17pm
Your question is quite ridiculous the way it is currently worded. Your logic is very skewed on this and you really need to clarify what you are asking. If you don't then I can only assume that you really need to learn about the very basics of web application development before you attempt to go here.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you're talking about winforms apps, I think the best approach would be to have a central server running a web service that tracks gridview selections in real time by receiving messages from client applications.

Personally, I don't think it's practical to prevent multiple users from selecting an item in a grid view. If you're trying to prevent multiple users from updating a database record, then you can take steps to indicate that a particular item in the grid is locked, but you're looking at a butt-load of design, infrastructure design and considerations, and finally, code.

Good luck with that.

Marcus Kramer 25-Dec-10 21:16pm
Cheers John... Great answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,643
CHill60 2,970
Maciej Los 2,348
Jochen Arndt 1,900
ppolymorphe 1,765

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 25 Dec 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100