تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مساعدة في اللست بوكس Listbox
#10
جرب هذا الكود (طبعا بطريقة الكود)
كود :
Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged

    Try

        txtshowname.Text = ""
        lst_show.Items.Clear()

        Dim sql As String = "Select * From [table1] Where [name]='" & DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells(0).Value & "'"
        Dim da As New OleDb.OleDbDataAdapter(sql, con)
        Dim dt As New DataTable
        da.Fill(dt)

        txtshowname.Text = dt.Rows(0).Item("name")
        lst_show.Items.AddRange(dt.Rows(0).Item("units").Split(", "))

    Catch ex As Exception
    End Try

End Sub
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مساعدة في اللست بوكس Listbox - بواسطة Sajad - 24-08-13, 05:00 PM
مساعدة في اللست بوكس Listbox - بواسطة MSDOS - 24-08-13, 05:58 PM
مساعدة في اللست بوكس Listbox - بواسطة MSDOS - 24-08-13, 06:27 PM
مساعدة في اللست بوكس Listbox - بواسطة MSDOS - 25-08-13, 02:12 PM
مساعدة في اللست بوكس Listbox - بواسطة MSDOS - 25-08-13, 03:54 PM
مساعدة في اللست بوكس Listbox - بواسطة MSDOS - 25-08-13, 04:52 PM
مساعدة في اللست بوكس Listbox - بواسطة MSDOS - 25-08-13, 05:25 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم