This is a migrated thread and some comments may be shown as answers.

Custom Insert Form Template using RAD Upload control

1 Answer 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thomas Feaster
Top achievements
Rank 1
Thomas Feaster asked on 23 Sep 2008, 04:55 PM
I have an urgent question under deadline!

I have a grid that I use to display files that have been attached to records in my database.  I want to develop the ability to use the Insert functionality of the grid to insert a new file into the database.  I have 2 fields: 1) the path of the file, which I map to a button column.  When the user clicks "launch in this column, it opens the file using the path from the database.  and 2) an Icon field which is the name of an image to display in relation to the file. 

When the user clicks "Add New Record", I want to display a custom form inside the grid with the RAD Upload control.  I then want to handle an event where I can use custom logic to determine the value for my "Icon" field and insert the record using the file selected with the RAD Upload control.

Can someone point me in the right direction?  I reviewed a Telerik documentation which directs me to use EditFormTemplate, but its not clear to me.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Sep 2008, 05:04 AM
Hello Thomas,
    You can go through the following code snippet to create a FormTemplate.
aspx:
            
         <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server"
           <MasterTableView DataSourceID="SqlDataSource1" EditMode="EditForms">  
             <EditFormSettings EditFormType="Template"
                <FormTemplate> 
                    <telerik:RadUpload ID="RadUpload1" runat="server" />                
                </FormTemplate> 
             </EditFormSettings> 
           </MasterTableView>            
        </telerik:RadGrid> 

You can also refer to the following link to understand how to manually insert data from the grid to the Database.
Insert/Update/Delete at database level with queries

Princy.
Tags
Grid
Asked by
Thomas Feaster
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or