Hi
I am fetching image from the server and i want to bind with the template
column of grid (which hold the image control) using silverlight 3.
thanks
prabhat
2 Answers, 1 is accepted
0
Milan
Telerik team
answered on 30 Jul 2009, 06:23 AM
Hi prabhat,
That is actioally quite easy to implement - you have to create a new column similar to the following:
<telerik:RadGridView Name="RadGridView1">
<telerik:RadGridView.Columns>
<telerik:GridViewColumn HeaderText="Picture">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<Image Source="{Binding Path=ImageBytes}"/>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
After the column and its new CellTemplate is defined you just have to bind the Image.Source to the correct data item property. For example, If the grid is bound to a collection ot Picture data objects that have a property PictureBytes, which stores the bytes of an image, you should bind to the property.
Hi
Thanks for your answer.
But it is not working,actually i am taking image control inside the template column,
so it needs to first find the control and then bind the the controls,which is returns as bytes.
above answer is the statics binding of the controls.