[CLOSED] DirectEvent issue with FormPanel and multipart data (FileUploadField / Other fields)

  1. #1

    [CLOSED] DirectEvent issue with FormPanel and multipart data (FileUploadField / Other fields)

    Last edited by Baidaly; Dec 20, 2013 at 7:56 PM. Reason: [CLOSED]
  2. #2
    If I understood correctly then you need one of the following solutions:
    - set Type="Load" for directt event to prevent fields submitting
    or
    - set IsUpload for DirectResult to indicate that requestshould be considered as uploading request
  3. #3
  4. #4
    You should set it for DirectEvent which call actions with PartialViewResult
  5. #5
  6. #6
    Hi Vladimir,

    Quote Originally Posted by Vladimir View Post
    You should set it for DirectEvent which call actions with PartialViewResult
    Below, follows a small adapted sample of the case, that I am trying and it is not working.
    Please, note that I included the Click.Type in the DirectEvent, but not solved the issue:

    var X = Html.X();
        
    X.FormPanel()
    .Layout(LayoutType.VBox)
        .Items(
            X.Container()
                .Layout(LayoutType.HBox)
                .Items(
                    X.TextFieldFor(s => s.FieldA),
                        
                    X.TextFieldFor(s => s.FieldB),
                        
                    X.Button().Icon(Icon.Find)
                        .DirectEvents(de =>
                        {
                            de.Click.Type = DirectEventType.Load;
                            de.Click.Url = Url.Action(MVC.MyArea.MyController.MyAction());
                            de.Click.EventMask.ShowMask = true;
                            de.Click.ExtraParams.Add(new { extraParmXXX = "D" });
                        })
                ),
            X.Container()
                .Layout(LayoutType.HBox)
                .Items(
                    X.FileUploadField().Icon(Icon.Attach).ID("file1"),
                    X.FileUploadField().Icon(Icon.Attach).ID("file2")
                )
            );
    Last edited by Daniil; Dec 23, 2013 at 4:12 AM. Reason: Please use [CODE] tags
  7. #7
  8. #8
    Hello!

    Is this problem solved?
  9. #9

Similar Threads

  1. FormPanel don't get FileUploadField value
    By caio.vidal in forum 2.x Help
    Replies: 2
    Last Post: Jun 18, 2013, 1:21 AM
  2. [CLOSED] FileUploadField DirectEvent blocking
    By zwf in forum 2.x Legacy Premium Help
    Replies: 12
    Last Post: Dec 14, 2012, 11:27 AM
  3. [CLOSED] [MVC Razor] FileUploadField with FormPanel
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 19, 2012, 4:57 PM
  4. Replies: 4
    Last Post: Apr 24, 2012, 11:59 AM
  5. [CLOSED] FormPanel and FileUploadField
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 13, 2011, 10:49 PM

Tags for this Thread

Posting Permissions