Click here to Skip to main content
16,005,149 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Searching a Specific Record from DB !! Pin
Paul Conrad28-Feb-08 6:45
professionalPaul Conrad28-Feb-08 6:45 
QuestionHow can I associate two checkboxes in two different forms? Pin
JUNEYT27-Feb-08 16:30
JUNEYT27-Feb-08 16:30 
GeneralRe: How can I associate two checkboxes in two different forms? Pin
Mycroft Holmes27-Feb-08 17:58
professionalMycroft Holmes27-Feb-08 17:58 
GeneralRe: How can I associate two checkboxes in two different forms? Pin
Christian Graus27-Feb-08 18:11
protectorChristian Graus27-Feb-08 18:11 
GeneralRe: How can I associate two checkboxes in two different forms? Pin
Mycroft Holmes28-Feb-08 2:27
professionalMycroft Holmes28-Feb-08 2:27 
GeneralRe: How can I associate two checkboxes in two different forms? Pin
Christian Graus28-Feb-08 9:43
protectorChristian Graus28-Feb-08 9:43 
Generalcheck all checkbox in datagrid window form Pin
Eunice (VB junior)27-Feb-08 14:26
Eunice (VB junior)27-Feb-08 14:26 
GeneralRe: check all checkbox in datagrid window form Pin
User 27100927-Feb-08 15:01
User 27100927-Feb-08 15:01 
I found this article here on Code Project.

http://www.codeproject.com/KB/grid/DataGridView_winforms.aspx[^]

I converted the below method for you, from C# to VB.NET. Just wire up this event handler and set the column index to match your data grid layout. The below code assumes that the CheckBox column is the first column, so if your is not, you'll need to make a few changes:

Just change the two following lines of code and replace the "0" with the correct column index.

If e.ColumnIndex = 0 Then

dataGridView1.Rows(i).Cells(0).Value = dgvColumnHeader.CheckAll

Private Sub dataGridView1_ColumnHeaderMouseClick(ByVal sender As Object, ByVal e As DataGridViewCellMouseEventArgs) 
    If e.ColumnIndex = 0 Then 
        For i As Integer = 0 To dataGridView1.Rows.Count - 1 
            dataGridView1.Rows(i).Cells(0).Value = dgvColumnHeader.CheckAll 
        Next 
    End If 
End Sub 


Cheers, Karl

» CodeProject 2008 MVP

My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your Articles

Just a grain of sand on the worlds beaches.



modified 27-Feb-21 21:01pm.

GeneralRe: check all checkbox in datagrid window form Pin
Eunice (VB junior)27-Feb-08 15:15
Eunice (VB junior)27-Feb-08 15:15 
GeneralRe: check all checkbox in datagrid window form Pin
User 27100927-Feb-08 15:20
User 27100927-Feb-08 15:20 
GeneralCombobox in datagrid Pin
indian14327-Feb-08 10:44
indian14327-Feb-08 10:44 
GeneralRe: Combobox in datagrid Pin
RCoate27-Feb-08 14:03
RCoate27-Feb-08 14:03 
Questioncalling C++ from Visual Basic code Pin
mesho27-Feb-08 7:55
mesho27-Feb-08 7:55 
GeneralRe: calling C++ from Visual Basic code Pin
Dave Kreskowiak27-Feb-08 8:04
mveDave Kreskowiak27-Feb-08 8:04 
GeneralRe: calling C++ from Visual Basic code Pin
Eytukan28-Feb-08 5:37
Eytukan28-Feb-08 5:37 
GeneralRe: calling C++ from Visual Basic code Pin
AndrewVos28-Feb-08 14:24
AndrewVos28-Feb-08 14:24 
QuestionDataset problem Pin
IvanIT27-Feb-08 7:38
IvanIT27-Feb-08 7:38 
GeneralRe: Dataset problem Pin
Dave Kreskowiak27-Feb-08 8:03
mveDave Kreskowiak27-Feb-08 8:03 
GeneralRe: Dataset problem Pin
IvanIT27-Feb-08 8:15
IvanIT27-Feb-08 8:15 
GeneralRe: Dataset problem Pin
Dave Kreskowiak27-Feb-08 9:11
mveDave Kreskowiak27-Feb-08 9:11 
GeneralRe: Dataset problem Pin
Vimalsoft(Pty) Ltd27-Feb-08 19:48
professionalVimalsoft(Pty) Ltd27-Feb-08 19:48 
Generalsearching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
mishiago27-Feb-08 7:02
mishiago27-Feb-08 7:02 
GeneralRe: searching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
Dave Kreskowiak27-Feb-08 7:31
mveDave Kreskowiak27-Feb-08 7:31 
GeneralRe: searching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
mishiago27-Feb-08 7:49
mishiago27-Feb-08 7:49 
GeneralRe: searching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
Mycroft Holmes27-Feb-08 18:02
professionalMycroft Holmes27-Feb-08 18:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.