Using the following code I found in one of the demos. The radgrid is bound to a sqldatasource.
When I update or insert, there is no parameter created for the binary image to send data to the database ( I have added onUpdating and onInserting events to the sql data source, and have inspected the DBParameters collection, and there is no parameter passed containing the binary data of the image.) other columns from the grid are passed as parameters correctly, there is simply no sqlparameter for the image data.
How can I rectify this?
Also, the radupload dialog to select a image does not seem to work with the allowedfileextensions option. Also I specify jpg only, I see all file types in the selection dialog. Is there a way to only show those files w/ the allowed extensions?
<
telerik:GridTemplateColumn
DataField
=
"Data"
HeaderText
=
"Image"
UniqueName
=
"Upload">
<
ItemTemplate>
<
telerik:RadBinaryImage
runat
=
"server"
ID
=
"RadBinaryImage1"
DataValue='<%#Eval("Data") %>
AutoAdjustImageControlSize="false" Height="80px" Width="80px" ToolTip='<%#Eval("Name", "Photo of {0}") %>' AlternateText='<%#Eval("Name", "Photo of {0}") %>'>
</
telerik:RadBinaryImage
>
</
ItemTemplate>
<
EditItemTemplate>
<
telerik:RadAsyncUpload
RenderMode
=
"Lightweight"
runat
=
"server"
ID
=
"AsyncUpload1"
AllowedFileExtensions
=
"jpg" >
</
telerik:RadAsyncUpload
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>