Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#2.0
Hi,
 
how can I prevent users from selecting the same row at the same time in a grid view (asp.net 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
Edited 25-Dec-10 1:01am
JF201553.1K
v2
Comments
Marcus Kramer at 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.
   
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.
JF2015 at 25-Dec-10 7:01am
   
Corrected minor spelling and grammar errors.

1 solution

Rate this: bad
good
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.

  Permalink  
Comments
Marcus Kramer at 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
0 Sergey Alexandrovich Kryukov 495
1 OriginalGriff 339
2 ChintanShukla 305
3 Richard Deeming 235
4 RyanDev 230
0 Sergey Alexandrovich Kryukov 8,858
1 OriginalGriff 7,451
2 CPallini 2,603
3 Richard MacCutchan 2,095
4 Abhinav S 1,893


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 25 Dec 2010
Copyright © CodeProject, 1999-2014
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