none
Alguém me ensina como se se faz um "RaiseEvent" para essa rotina funcionar? RRS feed

  • Pergunta

  • Public Class Form1

        Private Sub SetUpDataGridView()
            Me.Controls.Add(DataGridView1)
            DataGridView1.ColumnCount = 5
            Dim style As DataGridViewCellStyle = DataGridView1.ColumnHeadersDefaultCellStyle
            style.BackColor = Color.Navy
            style.ForeColor = Color.White
            style.Font = New Font(DataGridView1.Font, FontStyle.Bold)
            DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
            DataGridView1.Name = "DataGridView1"
            DataGridView1.Location = New Point(8, 8)
            DataGridView1.Size = New Size(500, 300)
            DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders
            DataGridView1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Raised
            DataGridView1.CellBorderStyle = DataGridViewCellBorderStyle.Single
            DataGridView1.GridColor = SystemColors.ActiveBorder
            DataGridView1.RowHeadersVisible = False
            DataGridView1.Columns(0).Name = "Data Lançamento"
            DataGridView1.Columns(1).Name = "Rastrear"
            DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
            DataGridView1.Columns(2).Name = "Titulo"
            DataGridView1.Columns(3).Name = "Artista"
            DataGridView1.Columns(4).Name = "Album"
            DataGridView1.Columns(4).DefaultCellStyle.Font = New Font(DataGridView.DefaultFont, FontStyle.Italic)
            DataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
            DataGridView1.MultiSelect = False
            DataGridView1.BackgroundColor = Color.Honeydew
            DataGridView1.Dock = DockStyle.Fill
            DataGridView1.CellFormatting += New DataGridViewCellFormattingEventHandler(DataGridView1_CellFormatting)
            DataGridView1.CellParsing += New DataGridViewCellParsingEventHandler(DataGridView1_CellParsing)
            addNewRowButton.Click += New EventHandler(addNewRowButton_Click)
            deleteRowButton.Click += New EventHandler(deleteRowButton_Click)
            ledgerStyleButton.Click += New EventHandler(ledgerStyleButton_Click)
            DataGridView1.CellValidating += New DataGridViewCellValidatingEventHandler(DataGridView1_CellValidating)
        End Sub

    End Class
    sábado, 8 de agosto de 2020 15:17