Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ulala

Sub combo() Try cmd = New SqlCommand("Select no from tblgurupns", con) da = New SqlDataAdapter(cmd) Dim dt As New DataTable() da.Fill(dt) If dt.Rows.Count > 0 Then ComboBox1.DataSource = dt ComboBox1.DisplayMember = "no" Else MessageBox.Show("Empty") End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub ========================= Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call bersih() DataGridView1.Columns(0).HeaderText = “Kode Bank” DataGridView1.Columns(1).HeaderText = “Nama Bank” DataGridView1.Columns(2).HeaderText = “No. Account” DataGridView1.Columns(3).HeaderText = “Mata Uang” DataGridView1.Columns(4).HeaderText = “Saldo” DataGridView1.Columns(5).HeaderText = “Description” End Sub Private Sub DGJenisBrg_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.DoubleClick TextBox1.Text = DataGridView1.SelectedCells(0).Value TextBox2.Text = DataGridView1.SelectedCells(1).Value TextBox3.Text = DataGridView1.SelectedCells(2).Value ComboBox2.Text = DataGridView1.SelectedCells(3).Value TextBox4.Text = DataGridView1.SelectedCells(4).Value TextBox5.Text = DataGridView1.SelectedCells(5).Value ‘TextBox3.Text = DGPasien.SelectedCells(6).Value ‘TextBox4.Text = DGPasien.SelectedCells(7).Value End Sub