.NET/VB.NET
[VisualBasic.NET] Infragistics UltraWinGrid Cell 에 Image 추가하기
WooGong Peter
2009. 4. 20. 14:14
그림 추가하기...
' declare a DataTable to contain the program generated data
Dim dataTable As New DataTable("Cells")
' create and add a Column
Dim colWork As New DataColumn("Name", GetType(String))
dataTable.Columns.Add(colWork)
' create and add a column
colWork = New DataColumn("Picture", GetType(Byte()))
dataTable.Columns.Add(colWork)
' add some rows
Dim row As DataRow = dataTable.NewRow()
row("Name") = "me2.jpg"
Dim aBitMap As Bitmap
row("Picture") = aBitMap.FromFile(AppPath() + "..\me2.jpg")
dataTable.Rows.Add(row)
' add some rows
row = dataTable.NewRow
row("Name") = "Amanda eating mashed potatos 06.JPG"
row("Picture") = aBitMap.FromFile(AppPath() + "..\Amanda eating mashed potatos 06.JPG")
dataTable.Rows.Add(row)
Return dataTable
' declare a DataTable to contain the program generated data
Dim dataTable As New DataTable("Cells")
' create and add a Column
Dim colWork As New DataColumn("Name", GetType(String))
dataTable.Columns.Add(colWork)
' create and add a column
colWork = New DataColumn("Picture", GetType(Byte()))
dataTable.Columns.Add(colWork)
' add some rows
Dim row As DataRow = dataTable.NewRow()
row("Name") = "me2.jpg"
Dim aBitMap As Bitmap
row("Picture") = aBitMap.FromFile(AppPath() + "..\me2.jpg")
dataTable.Rows.Add(row)
' add some rows
row = dataTable.NewRow
row("Name") = "Amanda eating mashed potatos 06.JPG"
row("Picture") = aBitMap.FromFile(AppPath() + "..\Amanda eating mashed potatos 06.JPG")
dataTable.Rows.Add(row)
Return dataTable
반응형