Hi Telerik team,
WE are writting an internal project to handle our databases for us, we are currently testing to see if RadGrid would be good enougth to use to display the data given a SQL data source. This is all fine and the datagrid creates the columns and rows for the sql datasource it is given.
The only exception is that in some of our database tables we have BLOB fields, these basically store byte data. It could essentially be anything from an image to a zip file. Since the datagrid does not recognise the BLOB field when using something like below:
there is a field in that table called img. This is a blob field, it will serve the image if i used a
The only problem is like i said since we are swapping datasources depending on the connection string and table selected the blob field may not be an image it could be anything. Is there anyway to get the grid to create the column for these blob fields, and if necessary just let the user know its a blob field. We can move onto displaying the data at a later date (i.e. if its an image display it, if its a zip then just display the binary data/string of bytes.)
I hope i have explained that correctly...
Regards
Ian Ramsay
Programmer
Imagered Ltd
www.imagered.co.uk
WE are writting an internal project to handle our databases for us, we are currently testing to see if RadGrid would be good enougth to use to display the data given a SQL data source. This is all fine and the datagrid creates the columns and rows for the sql datasource it is given.
The only exception is that in some of our database tables we have BLOB fields, these basically store byte data. It could essentially be anything from an image to a zip file. Since the datagrid does not recognise the BLOB field when using something like below:
| <asp:SqlDataSource ID="DS" runat="server" |
| ConnectionString="Provider=SQLOLEDB.1;Data Source=evolve;Persist Security Info=True;User ID=sa;Initial Catalog=nvis" |
| DeleteCommand="DELETE FROM [images] WHERE [ref] = ? AND [Typ] = ?" |
| InsertCommand="INSERT INTO images (ref, Typ, ext, added, modified) VALUES (?, ?, ?, ?, ?)" |
| ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM [images]" |
| UpdateCommand="UPDATE [images] SET [img] = ?, [ext] = ?, [added] = ?, [modified] = ? WHERE [ref] = ? AND [Typ] = ?"> |
| <DeleteParameters> |
| <asp:Parameter Name="ref" Type="String" /> |
| <asp:Parameter Name="Typ" Type="String" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="ext" Type="String" /> |
| <asp:Parameter Name="added" Type="DateTime" /> |
| <asp:Parameter Name="modified" Type="DateTime" /> |
| <asp:Parameter Name="ref" Type="String" /> |
| <asp:Parameter Name="Typ" Type="String" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="ref" Type="String" /> |
| <asp:Parameter Name="Typ" Type="String" /> |
| <asp:Parameter Name="ext" Type="String" /> |
| <asp:Parameter Name="added" Type="DateTime" /> |
| <asp:Parameter Name="modified" Type="DateTime" /> |
| </InsertParameters> |
| </asp:SqlDataSource> |
there is a field in that table called img. This is a blob field, it will serve the image if i used a
| <telerik:GridBinaryImageColumn DataField="img"></telerik:GridBinaryImageColumn> |
The only problem is like i said since we are swapping datasources depending on the connection string and table selected the blob field may not be an image it could be anything. Is there anyway to get the grid to create the column for these blob fields, and if necessary just let the user know its a blob field. We can move onto displaying the data at a later date (i.e. if its an image display it, if its a zip then just display the binary data/string of bytes.)
I hope i have explained that correctly...
Regards
Ian Ramsay
Programmer
Imagered Ltd
www.imagered.co.uk