Jump to content

Recommended Posts

Posted

Boa Tarde

Necessito de uma ajuda para a seguinte questão:

Em Visual studio 2010 com visual basic em windows forms,

Tenho um datagridview com o nome cotacoesdatagridview onde criei uma coluna chamada Selecionar do tipo DataGridViewCheckBoxColumn,

pretendo que todos os registos que coloco como true neste cotacoesdatagridview ao clikar no button gravar esta vai inserir os registos

numa tabela de vendas que está no segundo datagridview chamada vendasdatagridview, como faço podem ajudar-me sff.

Obrigado

Carlos Parente

Posted
For Each L As DataGridViewRow In Dgv.Rows
    If L.IsNewRow Then Exit For
    'Verifica se o valor da coluna Sim/Não é sim
    If L.Cells(0).Value = True Then
'Insere o registo
    End If
Next

Pedro Martins

Não respondo a duvidas por PM

Posted

For Each L As DataGridViewRow In Dgv.Rows

    If L.IsNewRow Then Exit For

    'Verifica se o valor da coluna Sim/Não é sim

    If L.Cells(0).Value = True Then

        'Insere o registo

    End If

Next

Pedro Martins, Muitissimo Obrigado pela ajuda, mas como consigo obter o Dgv.Rows

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.