Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Multiple select on datagridview

Posted on 2010-09-17
2
Medium Priority
?
478 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 800 total points
ID: 33699630
0
 
LVL 7

Accepted Solution

by:
klakkas earned 1200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

886 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