[CLOSED] Problem when using FileUploadField with a gridPanel

  1. #1

    [CLOSED] Problem when using FileUploadField with a gridPanel

    Hi all,

    I want to browse and upload a file using the FileUploadField.
    To do this, I place a GridCommand, and on click, I open the dialogue and choose a file.
    When calling any method in the code behind, and whatever it contains, I get an error on InternetExplorer: "Microsoft JScript runtime error: Access is denied."

    
     <ext:ResourceManager runat="server" Namespace="myResource">
            </ext:ResourceManager>
            <ext:GridPanel ID="GridPanel1" runat="server" Title="Editable GridPanel" Width="600"
                Height="350">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Model>
                            <ext:Model ID="Model1" runat="server" IDProperty="getId">
                                <Fields>
                                    <ext:ModelField Name="getId" Type="Int" />
                                    <ext:ModelField Name="getFirstName" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ID="Column1" runat="server" Text="ID" DataIndex="getId" Width="35" />
                        <ext:Column ID="Column2" runat="server" Text="NAME" DataIndex="getFirstName" Flex="1">
                        </ext:Column>
                        <ext:CommandColumn ID="CommandColumn1" runat="server">
                            <Commands>
                                <ext:GridCommand Icon="ApplicationAdd" CommandName="Browse">
                                </ext:GridCommand>
                            </Commands>
                            <Listeners>
                                <Command Handler="#{myFileUpload}.fileInputEl.dom.click();" />
                            </Listeners>
                        </ext:CommandColumn>
                    </Columns>
                </ColumnModel>
                <SelectionModel>
                    <ext:CellSelectionModel ID="CellSelectionModel1" runat="server" />
                </SelectionModel>
            </ext:GridPanel>
            <ext:FileUploadField Hidden="true" ID="myFileUpload" runat="server">
                <DirectEvents>
                    <Change OnEvent="myFunction" IsUpload="true" />
                </DirectEvents>
            </ext:FileUploadField>
    myFunction is a function in the code behind.
    Last edited by Daniil; Sep 14, 2012 at 1:46 PM. Reason: [CLOSED]
  2. #2
    IE forbids to interact with upload field such way due security reason
    A user must click on upload field
  3. #3
    Ok,

    Why we can't use the FileUploadField in the Editor in the girdPanel??
    When using it, nothing appear in the cell.

    Thanks in advance.
  4. #4
    Store cannot operate with file upload field, it does't return a file on the client side (upload field can be submittable only)
    And only one instance of editor is used for all cells within the column
  5. #5
    Click image for larger version. 

Name:	UploadFile.png 
Views:	140 
Size:	7.6 KB 
ID:	4753

    I'm blocked now.
    Do you have any suggestion to simulate the example in the picture, in order to upload a file using the gridpanel ??

    Thanks.
  6. #6
    Unfortunately, no
    Only if open popup dialog when 'Upload file' link is clicked, in that dialog need use upload field and upload it. On the server side associate the submitted file with required record

Similar Threads

  1. [CLOSED] FileUploadField in ComponentMenuItem problem
    By xeo4.it in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 14, 2012, 1:13 PM
  2. fileuploadfield control width problem
    By kondareddy1984 in forum 1.x Help
    Replies: 4
    Last Post: Apr 22, 2011, 5:34 PM
  3. Replies: 2
    Last Post: Feb 16, 2011, 9:10 AM
  4. MVC: problem with FileUploadField
    By Iban in forum 1.x Help
    Replies: 1
    Last Post: Jan 20, 2011, 3:40 PM
  5. Crazy problem with FileUploadField
    By hbbazan in forum 1.x Help
    Replies: 3
    Last Post: Feb 05, 2010, 9:54 AM

Tags for this Thread

Posting Permissions