Grid Panel - Double Click as Direct event (not working how I think it should)

  1. #1

    Grid Panel - Double Click as Direct event (not working how I think it should)

    I have a gridpanel and when a row is double clicked on, two parameters will be sent to a controller method, then the values returned will be inserted into a formpanel, the formpanel which is in a window will then be shown. The controller method should return nothing.

    However, each time I double click on a row the file download dialog appears, which I dont understand why that happens?
    The debugger found in the Success property of the RowDblClick tag is never reached.
    The formpanel, found in the window, contains two fields which never get filled with the values returned from the controller method.

    Here is the row double click code and below that is the controller method.

                                    <DirectEvents>
                                        <RowDblClick Url="/Personal/loadMessage/" CleanRequest="true" Before="MessageViewWindow.show();Ext.net.Mask.show({msg: 'Loading Email, Please Wait...'});"
                                            Success="debugger;BodyFieldMessageViewFormPanel.setValue(result.extraParamsResponse.body); AttachmentsFieldMessageViewFormPanel.setValue(result.extraParamsResponse.attachments); Ext.net.Mask.hide();">
                                            <ExtraParams>
                                                <ext:Parameter Name="messageAddress" Mode="Raw" Value="GridPanel1.getRowsValues({ selectedOnly: true })[0].Address" />
                                                <ext:Parameter Name="hasAttachment" Mode="Raw" Value="GridPanel1.getRowsValues({ selectedOnly: true })[0].HasAttachments" />
                                            </ExtraParams>
                                        </RowDblClick>
                                    </DirectEvents>
            public AjaxResult loadMessage(String messageAddress, bool hasAttachment)
            {
                String attachments = getAttachments(messageAddress);
    
                setEmailRead(messageAddress);
    
                Message message1 = resource.GetMessage(messageAddress);
    
                String body = reconfigureImageTags(messageAddress, message1.HtmlDescription, hasAttachment); // This action and sub-actions are the problem
    
                AjaxResult result = new AjaxResult();
                result.ExtraParamsResponse.Add(new Parameter { Name = "body", Value = body});
                result.ExtraParamsResponse.Add(new Parameter { Name = "attachments", Value = attachments });
    
                return result;
            }
  2. #2
    Hi,

    Do you use form with runat="server" in the page?
    I guess that you have form and inside that form upload field.
    Try to set Type="Load" for direct event
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Hello Vladimir

    Do you use form with runat="server" in the page?
    I guess that you have form and inside that form upload field.
    Yeah your absolutely right, I have a form tag with runat="server" wrapped around all of the components (including a form upload field). Is it correct to wrap the form tag around all components on a page?

    Try to set Type="Load" for direct event
    Thanks Vladimir that solved it.
  4. #4
    Quote Originally Posted by rbarr View Post
    Is it correct to wrap the form tag around all components on a page?
    Well, you need to use <form> if you need to submit some fields to server, also <form> is required to upload a file, etc.

Similar Threads

  1. Replies: 0
    Last Post: May 12, 2012, 11:24 AM
  2. Double click the row in the grid...
    By Tanielian in forum 1.x Help
    Replies: 1
    Last Post: Sep 03, 2010, 2:23 PM
  3. [CLOSED] Row double click event on gridpanel
    By yobnet in forum 1.x Premium Help
    Replies: 3
    Last Post: Apr 29, 2010, 2:54 AM
  4. Hover and double-click event on Panel?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: May 07, 2009, 1:58 AM
  5. [CLOSED] IE 7 - Grid Panel Row Double Click error
    By james.healey in forum 1.x Premium Help
    Replies: 6
    Last Post: Jan 16, 2009, 1:24 PM

Tags for this Thread

Posting Permissions