30-06-14, 12:42 PM
03-07-14, 05:11 AM
جرب هذا الكود
كود :
Dim SqlQuery As String = "SELECT * FROM Account"
Dim SqlCommend As New OleDbCommand
Dim SqlAdapter As New OleDbDataAdapter
Dim TABLE As New DataTable
With SqlCommend
.CommandText = SqlQuery
.Connection = conn
End With
With SqlAdapter
.SelectCommand = SqlCommend
.Fill(TABLE)
End With
Me.DataGridViewX1.Rows.Clear()
For i As Integer = 0 To TABLE.Rows.Count - 1
With Me.DataGridViewX1
.Rows.Add(TABLE.Rows(i)("ID"), TABLE.Rows(i)("Fullname"), TABLE.Rows(i)("image"))
End With
Next
If CStr(Me.DataGridViewX1.Rows(0).Cells(2).Value) = "1" Then
'Dim imgNormal As Image
'imgNormal = Me.ImageList1.Images(0)
DataGridViewX1.Rows(0).Cells(2).Value = ImageList1.Images(0)
End If
06-07-14, 10:11 AM
شكرا اخي بارك الله بيك
بس اذا اكو كود c# أكون ممنون
بس اذا اكو كود c# أكون ممنون