Add not binary upload image in RadGrid detail view

Hello I'm beginner in asp.net .
I created this grid http://poshsunglasses.net/admin/Default.aspx VB driven
If you click on > of productid 1 you'll see the detail view of the master table for prod id 1.
Now i got stuck coz i don't know how to add instead of foto textbox an image uploader but not binary stored in database a normal image upload ... stored on the HDD and in the database only the path to the image .

thank you
SoftacidAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SoftacidAuthor Commented:
i added something like:
<telerik:GridAttachmentColumn DataSourceID="colordts"
   MaxFileSize="1048576"
   EditFormHeaderTextFormat="Upload File:"
   HeaderText="Foto"
   AttachmentDataField="BinaryData"
   AttachmentKeyFields="ID"
   FileNameTextField="Foto"
   DataTextField="Foto"
   UniqueName="AttachmentColumn">

</telerik:GridAttachmentColumn>

but won't save the file .. or the name of photo in db and also don't know where is suppose to be uploaded,

Thanks
0
SoftacidAuthor Commented:
The code of default.aspx here
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
    
        <asp:SqlDataSource ID="BrandDTS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sunglassesConnectionString %>" 
            SelectCommand="SELECT [id], [brand] FROM [brands]"></asp:SqlDataSource>
             <asp:SqlDataSource ID="GenderDTS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sunglassesConnectionString %>" 
            SelectCommand="SELECT [id], [gender] FROM [genders]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="TypeDTS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sunglassesConnectionString %>" 
            SelectCommand="SELECT [id], [types] FROM [types]"></asp:SqlDataSource>
            <asp:SqlDataSource ID="frameDTS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sunglassesConnectionString %>" 
            SelectCommand="SELECT [id], [frame] FROM [frames]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="productDTS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sunglassesConnectionString %>" 
            DeleteCommand="DELETE FROM [products] WHERE [id] = @id" 
            InsertCommand="INSERT INTO [products] ([model], [brandid], [gender], [frame], [code], [type], [new]) VALUES (@model, @brandid, @gender, @frame, @code, @type, @new)" 
            SelectCommand="SELECT * FROM [products]" 
            UpdateCommand="UPDATE [products] SET [model] = @model, [brandid] = @brandid, [gender] = @gender, [frame] = @frame, [code] = @code, [type] = @type, [new] = @new WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="model" Type="String" />
                <asp:Parameter Name="brandid" Type="Int32" />
                <asp:Parameter Name="gender" Type="Int32" />
                <asp:Parameter Name="frame" Type="Int32" />
                <asp:Parameter Name="code" Type="String" />
                <asp:Parameter Name="type" Type="Int32" />
                <asp:Parameter Name="new" Type="Boolean" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="model" Type="String" />
                <asp:Parameter Name="brandid" Type="Int32" />
                <asp:Parameter Name="gender" Type="Int32" />
                <asp:Parameter Name="frame" Type="Int32" />
                <asp:Parameter Name="code" Type="String" />
                <asp:Parameter Name="type" Type="Int32" />
                <asp:Parameter Name="new" Type="Boolean" />
            </InsertParameters>
        </asp:SqlDataSource>
    
        <asp:SqlDataSource ID="ColorDTS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sunglassesConnectionString %>" 
            DeleteCommand="DELETE FROM colors WHERE (id = @id)" 
            InsertCommand="INSERT INTO [colors] ([prodid], [color], [frame], [price], [foto], [discountinued]) VALUES (@prodid, @color, @frame, @price, @foto, @discountinued)" 
            SelectCommand="SELECT * FROM [colors] WHERE ([prodid] = @prodid)" 
            UpdateCommand="UPDATE [colors] SET [prodid] = @prodid, [color] = @color, [frame] = @frame, [price] = @price, [foto] = @foto, [discountinued] = @discountinued WHERE [id] = @id">
            <SelectParameters>
                <asp:Parameter Name="prodid" Type="Int32" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="prodid" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="prodid" Type="Int32" />
                <asp:Parameter Name="color" Type="String" />
                <asp:Parameter Name="frame" Type="String" />
                <asp:Parameter Name="price" Type="Decimal" />
                <asp:Parameter Name="foto" Type="String" />
                <asp:Parameter Name="discountinued" Type="Boolean" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="prodid" Type="Int32" />
                <asp:Parameter Name="color" Type="String" />
                <asp:Parameter Name="frame" Type="String" />
                <asp:Parameter Name="price" Type="Decimal" />
                <asp:Parameter Name="foto" Type="String" />
                <asp:Parameter Name="discountinued" Type="Boolean" />
            </InsertParameters>
        </asp:SqlDataSource>
        <br />
       
      
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" 
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
            AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
            AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" 
            AutoGenerateEditColumn="True" DataSourceID="productDTS" GridLines="None" 
            ShowGroupPanel="True">
<MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="id" 
                DataSourceID="productDTS" EditMode="InPlace">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

    <DetailTables>
        <telerik:GridTableView runat="server" 
            AllowFilteringByColumn="False" CommandItemDisplay="Top" DataKeyNames="id" 
            DataSourceID="ColorDTS" EditMode="InPlace" GridLines="Horizontal">
            <ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="prodid" MasterKeyField="id" />
            </ParentTableRelation>
            <Columns>
                <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" 
                    DataField="prodid" Display="False" UniqueName="prodid">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="False" ColumnEditorID="id" 
                    DataField="Color" DefaultInsertValue="" HeaderText="Color" UniqueName="Color">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="False" DataField="Frame" 
                    DefaultInsertValue="" HeaderText="Frame" UniqueName="Frame">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="False" DataField="Price" 
                    DataType="System.Double" DefaultInsertValue="" HeaderText="Price" 
                    UniqueName="Price">
                </telerik:GridBoundColumn>
                <telerik:GridAttachmentColumn DataSourceID="colordts"
   MaxFileSize="1048576"
   EditFormHeaderTextFormat="Upload File:"
   HeaderText="Foto"
   AttachmentDataField="Foto"
   AttachmentKeyFields="Foto"
   FileNameTextField="Foto"
   DataTextField="Foto"
   UniqueName="Foto" FileName="foto" Text="Foto">
</telerik:GridAttachmentColumn> 
                 <telerik:GridCheckBoxColumn
 UniqueName="discountinued"
 HeaderText="Discountinued"
 DataField="discountinued"
 AllowSorting="true" AllowFiltering="False" DataType="System.Boolean" 
                    SortExpression="discountinued" >
</telerik:GridCheckBoxColumn> 
            </Columns>
            <EditFormSettings CaptionDataField="id">
            </EditFormSettings>
        </telerik:GridTableView>
    </DetailTables>
    <NoRecordsTemplate>
        No Products found?!
    </NoRecordsTemplate>
    <ExpandCollapseColumn Visible="True">
    </ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="id" 
            ReadOnly="True" SortExpression="id" 
            UniqueName="id">
        </telerik:GridBoundColumn>
        <telerik:GridDropDownColumn DataField="brandid" DataSourceID="BrandDTS" 
            ListTextField="Brand" ListValueField="ID" 
            UniqueName="Brand" 
            SortExpression="brandid" DataType="System.Int32" HeaderText="Brand">
        </telerik:GridDropDownColumn>
        <telerik:GridBoundColumn DataField="Model" 
            HeaderText="Model" SortExpression="model" UniqueName="brandid">
        </telerik:GridBoundColumn>
        <telerik:GridDropDownColumn DataField="frame" DataSourceID="frameDTS" 
            DataType="System.Int32" HeaderText="Frame" 
            ListTextField="frame" ListValueField="id" SortExpression="Frame" 
            UniqueName="column2">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="Gender" DataType="System.Int32" 
            HeaderText="Gender" UniqueName="column" 
            DataSourceID="GenderDTS" ListTextField="Gender" ListValueField="id" 
            SortExpression="Gender">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="type" DataSourceID="TypeDTS" 
            DataType="System.Int32" HeaderText="Type" 
            ListTextField="types" ListValueField="id" UniqueName="column1" 
            SortExpression="type">
        </telerik:GridDropDownColumn>
        <telerik:GridCheckBoxColumn DataField="new" DataType="System.Boolean" 
            HeaderText="new" SortExpression="new" UniqueName="new">
        </telerik:GridCheckBoxColumn>
    </Columns>
</MasterTableView>
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
        </telerik:RadGrid>
    
    </div>
    </form>
</body>
</html>

Open in new window

0
SoftacidAuthor Commented:
CodeCruiser: thank you for your answer but i will appreciate if you'll give me on the code i posted and referring to Telerik components ,


Thank you
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.