Hi,
I have a GridTemplateColumn with itemtemplate, in this itemtemplate i have a linkbutton and ImageControl, when i click the link i want show the image.
this is the aspx:
<telerik:GridTemplateColumn UniqueName="BtnPOD" HeaderStyle-Width="5%" ItemStyle-Width="10%" HeaderText="POD" AllowFiltering="false" >
<ItemTemplate>
<asp:LinkButton ID="btnPOD" CommandName ="detailPOD" Text='<%#Eval("POD")%>' runat="server"/>
<asp:Image ID="ImgPOD" runat="server" ImageUrl='<%#Eval("POD")%>' /> </ItemTemplate>
</telerik:GridTemplateColumn>
in vb, in the ItemCommand event:
If Not Image Is Nothing AndAlso Image.Length <> 0 Then
Dim arrpictures As Byte() = System.Convert.FromBase64String(Image)
Dim myStream As New System.IO.MemoryStream(arrpictures)
Dim base64String As String = Convert.ToBase64String(arrpictures, 0, arrpictures.Length)
For i = 0 To CType(Session("GridViewData"), DataTable).Rows.Count - 1
If i = e.Item.ItemIndexThen
CType(Session("GridViewData"), DataTable).Rows(i)("POD") = "data:image/jpeg;base64," & base64String
End If
Next
End If
i modify the DataTable and in needdatasource event:
RadGrid1.DataSource = CType(Session("GridViewData"), DataTable)
in needdatasource i check the changes in DataTable, but i can see the changes in radgrid