Jump to content

Merge em Datagridview

Recommended Posts



Tenho esse código que carrega a minha grid:

    Private Sub FillDISTR()
        Dim RsDistr As New DataSet
        RsDistr = Banco.RetornarDataSet("SELECT * from Qry_Distr WHERE IDFUNC_FERIAS =" & varID_FUNC & ";")

        'preenche a Grid
        With GridDistr
            .DataSource = RsDistr.Tables(0)

            .Columns(0).Name = "ID_DISTR"
            .Columns(0).Visible = False

            .Columns(1).Name = "IDFUNC_DISTR"
            .Columns(1).Visible = False

            .Columns(2).Width = 80
            .Columns(2).HeaderText = "Data"
            .Columns(2).Name = "DT_DISTR"

            .Columns(3).Width = 80
            .Columns(3).HeaderText = "Tipo"
            .Columns(3).Name = "TIPO_DISTR"

            .Columns(4).Width = 60
            .Columns(4).HeaderText = "Crédito"
            .Columns(4).Name = "CRED_ALI_DISTR"

            .Columns(5).Width = 60
            .Columns(5).HeaderText = "Taxa"
            .Columns(5).Name = "TX_ALI_DISTR"

            .Columns(6).Width = 80
            .Columns(6).HeaderText = "Emissão"
            .Columns(6).Name = "EMI_ALI_DISTR"

            .Columns(7).Width = 60
            .Columns(7).HeaderText = "Crédito"
            .Columns(7).Name = "CRED_REF_DISTR"

            .Columns(8).Width = 60
            .Columns(8).HeaderText = "Taxa"
            .Columns(8).Name = "TX_REF_DISTR"

            .Columns(9).Width = 80
            .Columns(9).HeaderText = "Emissão"
            .Columns(9).Name = "EMI_REF_DISTR"

            .Columns(10).Width = 80
            .Columns(10).HeaderText = "Total Crédito"
            .Columns(10).Name = "TOTALCRED_DISTR"

        End With

        RsDistr = Nothing

    End Sub

Só que preciso deixá-la assim:


Nunca fiz nada igual no VS2010, alguém pode me ajudar?

Share this post

Link to post
Share on other sites

Mas então no caso não tem como fazer da mesma forma do link acima?

O link que você me mandou faz merge das células e não dos títulos das colunas como eu quero.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.