Populating Rad ComboBox with Uploaded File

2 posts, 0 answers
  1. Jo
    Jo avatar
    7 posts
    Member since:
    Dec 2010

    Posted 11 Feb 2011 Link to this post

    I have a RadComboBox on my page which has an ItemTemplate defined containing a  RadAsyncUpload control.  When the file is uploaded I would like to populate the combobox with the name of the uploaded file.  Please can anyone explain why this code doesn't work:

    <telerik:RadComboBox ID="RadComboBoxDocument" runat="server" EmptyMessage="Choose an existing SPA or upload a new one" AppendDataBoundItems="true" Height="200px" Width="300px">
          <telerik:RadAsyncUpload ID="RadAsyncUploadDocument" runat="server" ControlObjectsVisibility="None" MultipleFileSelection="Disabled" MaxFileInputsCount="1" AllowedFileExtensions="pdf" Width="300px" OnClientFileUploaded="fileUploaded">
        <telerik:RadComboBoxItem Text=" " />
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Feb 2011 Link to this post


    Have you tried setting the text using client side method "set_text()" of RadComboBox?

    Try the following code and see whether it works as expected:
    function fileUploaded(sender, args) {
        var name = args.get_name();       
        var combo = $find('<%=  RadComboBoxDocument.ClientID %>');

  3. DevCraft R3 2016 release webinar banner
Back to Top