how can i do to bind the column in the dataset that contans the image with a gridviewimagecolumn and add to radgridview?
thnks for your help
Oscar Zapata
7 Answers, 1 is accepted
If the field in your DataTable is byte array all you need to do is to set DataMemberBinding to point to this field.
All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
i did that you recomend to me but the images dont appear, here is the code
Dim bind As New Binding
Dim colum As New GridViewImageColumn
' this is the column in the dataset that contains the images, each row contains a diferent image
bind.Source = datos.Tables(0).Columns(11)
colum.ImageHeight = 32
colum.ImageWidth = 32
colum.ImageStretch = 0
colum.Header =
"Icons"
colum.DataMemberBinding = bind
RadGridView1.Columns.Add(colum)
please help me
You need to set only property/field name for the Binding - for example:
Dim colum As New GridViewImageColumn
colum.DataMemberBinding = New Binding("YourProperty")
RadGridView1.Columns.Add(colum)
Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
It Doesnt Works!!
i aprecciate if you can help me with an specific example, here is my complete code
RadGridView1.ItemsSource = ds.Tables(0) ' in this code-line i am assign the source of the radgridview to my dataset ds
Dim colum As New GridViewImageColumn
colum.DataMemberBinding = New Binding("BL_FOTO") 'BL_FOTO is the field that conatins the images in the dataset
RadGridView1.Columns.Add(colum) ' add the column to the radgridview
as you can see in the attach image the images doesnt appear in the grid view image column of the radgridview
please help me
my best wishes
Oscar Zapata
I've attached an example project to demonstrate you grid with image column bound to DataTable.
Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
i tried to bind a gridviewimagecolumn with the column of datatable but was imposible that gridviewimagecolumn display the images,
when i bind the column that has the image in byte format with a gridviewdatacolumn in the cells display the image in byte format but when i bind with the gridviewimagecolumn the image doesnt appear, here is the code:
Dim column As New GridViewDataColumn
column.DataMemberBinding =
New Binding("IDENTFICACIN")
RadGridView1.Columns.Add(column)
Dim columNombre As New GridViewDataColumn
columNombre.DataMemberBinding =
New Binding("NOMBRE")
Me.RadGridView1.Columns.Add(columNombre)
Dim columApellido As New GridViewDataColumn
columApellido.DataMemberBinding =
New Binding("APELLIDO")
Me.RadGridView1.Columns.Add(columApellido)
Dim columImg As New GridViewImageColumn
columImg.DataMemberBinding =
New Binding("BL_FOTO")
Me.RadGridView1.Columns.Add(columImg)
RadGridView1.ItemsSource = data.Tables(0)
as you can see in the attach image the images doesnt appear in the gridviewimagecolumn of the radgridview
the binding of the rest columns work prefect but althought i follow your recomendation about the binding with the gridviewimagecolumn it doesnt work
Please help me!!!