Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Multiple select on datagridview

Posted on 2010-09-17
2
461 Views
Last Modified: 2013-11-07
Hi,
I have multiple select property on datagridview set.I am selecting multiple rows in the grid by mouse down and dragging to highlight multiple rows in grid.
What I want to do now is make the first boolean column  to have true value as the row gets selected by mouse dragging on it.
How can i achieve this?Any suggestions are appreciated.

Cheers
0
Comment
Question by:RIAS
2 Comments
 
LVL 7

Assisted Solution

by:gsiric
gsiric earned 200 total points
ID: 33699630
0
 
LVL 7

Accepted Solution

by:
klakkas earned 300 total points
ID: 33699653

    Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged

       
        For Each r As DataGridViewRow In DataGridView1.SelectedRows
            r.Cells(0).Value = True
        Next

        DataGridView1.EndEdit()
        DataGridView1.Refresh()

    End Sub
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 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