Solved

Multiple select on datagridview

Posted on 2010-09-17
2
457 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
Comment Utility
0
 
LVL 7

Accepted Solution

by:
klakkas earned 300 total points
Comment Utility

    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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now