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

additional fields not visible

6 Answers 94 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Mydatafactory
Top achievements
Rank 1
Mydatafactory asked on 19 Jun 2008, 03:27 PM
I've put the javascript of the example 'Additional Fields' in my project, set the OnClientAdded to AddTitle, but I can't see the additional fields.

Is there something more I have to change (code behind?) to make it work?

6 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 20 Jun 2008, 08:02 AM
Hi A.,

That is all you need to do.

If you still experience the problem - please paste the code here or open a new support ticket and attach a sample project there.

Sincerely yours,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mydatafactory
Top achievements
Rank 1
answered on 23 Jun 2008, 01:50 PM
Hello,

this is my .aspx code. Eventually I would like to have a checkboxlist in the upload which will retrieve values from a SQLdataSource



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Initiator_Form.aspx.vb" Inherits="Initiator_Form" %> 
 
<%@ 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"> 
 
 <script type="text/javascript">  
function addTitle(radUpload, args)  
{  
  //Get the cell which contains the file input.  
  // When ControlObjectsVisibility contains the CheckBoxes flag the  
  // first cell (index 0) is the cell with the checkbox, else the  
  // first cell is the cell with the file input.  
  var cell = args.Row.cells[1];  
 
  //Get the skinned file input (this is a DIV tag if  
  // EnableFileInputSkinning = true, otherwise <input type=file>)  
  var fileInput = cell.firstChild;  
 
  //We want the textboxes to be placed in one line (in the case  
  // when EnableFileInputSkinning = true and fileInput is DIV)  
  fileInput.style.display = "inline";  
 
  //Create the Title label and set its text  
  var text = document.createElement("span");  
  text.innerHTML = "Title: ";  
  cell.appendChild(text);  
 
  //Create the Title input and set its class from the used skin  
  var title = document.createElement("input");  
  title.className = "RadUploadInputField";  
 
  //Generate ID and name for the title input. RadUpload will need  
  // these server-side to get the value of the input  
  titletitle.id = title.name = radUpload.GetID("title");  
 
  //Append the additional input  
  cell.appendChild(title);  
}  
 
</script> 
 
 <link href="css/Regular.css" rel="stylesheet" type="text/css" /> 
<link href="css/RadOffice2007.css" rel="Stylesheet" type="text/css" />   
<html xmlns="http://www.w3.org/1999/xhtml">  
 
<head runat="server">  
    <title>Untitled Page</title> 
    </head> 
 
<body> 
    <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="ScriptManager1" runat="server"   
            EnableTheming="True">  
        </telerik:RadScriptManager> 
 
    <div> 
        <span class ="titlebar">Assignement form</span> 
 
 
    </div> 
 
    <table> 
        <tr> 
            <td> 
 
    <asp:Label ID="lblProjectName" runat="server" Text="Projectname" ></asp:Label> 
            </td> 
            <td> 
                <telerik:RadTextBox ID="txtProjectName" Runat="server" Skin="Office2007" Width="250px" > 
                </telerik:RadTextBox> 
            </td> 
        </tr> 
        <tr> 
            <td> 
 
    <asp:Label ID="lblProjectDescription" runat="server" Text="Project Description" ></asp:Label> 
            </td> 
            <td> 
    <telerik:RadTextBox ID="txtProjectDescription" Runat="server" Skin="Office2007"   
                    EmptyMessage="type here.." InvalidStyleDuration="100"   
                    LabelCssClass="RadOffice2007" Width="250px" Rows="3"   
                    TextMode="MultiLine" CssClass="radInputxxxx_Office2007" ShowButton="True">  
    </telerik:RadTextBox> 
            </td> 
        </tr> 
        <tr> 
            <td> 
 
    <asp:Label ID="lblReference" runat="server" Text="Our Reference" ></asp:Label> 
            </td> 
            <td> 
 
                <telerik:RadTextBox ID="txtReference" Runat="server" Skin="Office2007"   
                    Width="250px" > 
                </telerik:RadTextBox> 
            </td> 
        </tr> 
        <tr> 
            <td class="style2">  
                &nbsp;</td> 
            <td> 
 
    <telerik:RadUpload ID="RadUpload1" Runat="server" Skin="Web20" onclientadded="addTitle"   
                    ControlObjectsVisibility="AddButton"/>  
            </td> 
        </tr> 
        <tr> 
            <td class="style2">  
                &nbsp;</td> 
            <td> 
                <asp:Button ID="btnUpload" runat="server" CssClass="commandbutton" Text="Upload"   
                    Width="100px" /> 
            </td> 
        </tr> 
        </table> 
 
        </form> 
    </body> 
</html> 
 
 
0
Veselin Vasilev
Telerik team
answered on 23 Jun 2008, 02:13 PM
Hello A.,

It seems you are using the client-side API for the "classic" RadUpload.

I suggest that you check this help article: 
http://www.telerik.com/help/aspnet-ajax/upload_raduploadaddinginformation.html

I hope this helps.

Regards,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mydatafactory
Top achievements
Rank 1
answered on 23 Jun 2008, 04:36 PM
Hello Veskoni,

How can you see that I'm using the client-side API for the "classic" RadUpload.

I am not aware of that. Is there a 'non-classic' RadUpload? What is the difference?
0
Mydatafactory
Top achievements
Rank 1
answered on 24 Jun 2008, 03:12 PM
Can I have a checkboxlist filled by a datasource added as an additional field?
0
Accepted
Veselin Vasilev
Telerik team
answered on 26 Jun 2008, 11:35 AM
Hi A.,

RadUpload for ASP.NET AJAX (formerly Prometheus) is the successor of RadUpload for ASP.NET.
Its new architecture leverages the ASP.NET AJAX framework in order to directly benefit from client-side behaviors and capabilities.

Here are the demos for
Looking at your javascript code I saw this line:
var cell = args.Row.cells[1]; 

which uses the client-side API for the "classic" RadUpload.


If you are using RadUpload for ASP.NET AJAX I strongly recommend that you check the article I posted in my previous post.
Best wishes,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Upload (Obsolete)
Asked by
Mydatafactory
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Mydatafactory
Top achievements
Rank 1
Share this question
or