Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Looping in Datagridview

Reply
Thread Tools

Looping in Datagridview

 
 
Ruchi22 Ruchi22 is offline
Junior Member
Join Date: Sep 2011
Posts: 4
 
      10-15-2011
Mine is a windows app. containing forms named BOM nd BOMSelected..

There is datagridview in BOM which contains checkbox column.. When the user selects checkbox, the selected rows should be seen in the datagridview of other form, SelectedBom..

I have coded but don't get it working.. Some error..

Can you please help ??

Your Help is greatly appreciated..

Hers is what i have done !!

Public Class SelectedBom
Code:
    Private Sub SelectedBom_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'HemDatabase1DataSet4.partno' table. You can move, or remove it, as needed.
        'Me.PartnoTableAdapter.Fill(Me.HemDatabase1DataSet4.partno)

        Dim count As Integer = 0

        For j As Integer = 0 To BOM.dgv1.RowCount - 1

            If BOM.dgv1.Rows(j).Cells(0).Value = True Then

                Dim ro As New DataGridViewRow
                DataGridView2.Rows.Add(ro)

                For i As Integer = 0 To BOM.dgv1.ColumnCount - 1
                    Me.DataGridView2.Rows(count).Cells(i).Value = BOM.dgv1.Rows(j).Cells(i).Value
                Next

                count += 1

            End If

        Next

    End Sub
End Class
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
looping in array vs looping in a dic giuseppe.amatulli@gmail.com Python 5 09-20-2012 11:58 PM
DataGridView Scrollbars missing dbuchanan ASP .Net 3 11-18-2008 04:26 PM
VS2005 - DefaultValuesNeeded - bug? Adding default values in DataGridView dbuchanan ASP .Net 7 05-23-2006 05:09 PM
RE: DataGridView with databound combobox =?Utf-8?B?SmFrb2IgTGl0aG5lcg==?= ASP .Net 6 04-02-2006 03:46 PM
Forms inheritance - datagridview =?Utf-8?B?Rmlyb3o=?= ASP .Net 0 01-06-2006 08:37 AM



Advertisments