?
Solved

c# multiple datagridviews - set to only focus on one datagridview at a time

Posted on 2007-10-04
4
Medium Priority
?
1,140 Views
Last Modified: 2013-12-17
Hi,
I have a c# (visual studio 2005) WINDOWS application.  Inside the application I have a usercontrol with multiple datagridviews.  I would like to set it up in such a way that the blue selection bar will only be on one datagridview at a time.  For instance - if it was on datagridview A row 3 and I selected datagridview B row 2, the blue bar would no longer be on datagridview A and would now be on datagridview B row 2.  Thanks
0
Comment
Question by:tolninja
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Colemss earned 2000 total points
ID: 20013631
Use DataGrid1.SelectedItem = -1 in one of the other datagrid events like click
0
 
LVL 1

Author Comment

by:tolninja
ID: 20015412
Colemss,
Good idea.  Only the syntax you listed doesn't work.  I have no *.selecteditem.  Please advise.
0
 
LVL 5

Assisted Solution

by:Colemss
Colemss earned 2000 total points
ID: 20015502
that was web sorry

winforms
DataGridView1.ClearSelection
0
 
LVL 1

Author Comment

by:tolninja
ID: 20015529
haha.  I got it at the exact same time you did.  thanks for the help.  This works great.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question