[CLOSED] DirectEvent return parameters?

  1. #1

    [CLOSED] DirectEvent return parameters?

    Hi,

    Is it possible to pass some sort of return parameters or results to the "Success" event handler, which are produced in the DirectEvent code executed on the server? E.g., a new row identity value needs to be passed back to the Store on the client. Please provide a little code snippet with the approach that you'd suggest.
    Last edited by Daniil; Jul 13, 2012 at 7:52 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use the DirectEventArgs ExtraParamsResponse property. You will be able to access these parameters in the DirectEvent handlers like Success.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Please use the DirectEventArgs ExtraParamsResponse property. You will be able to access these parameters in the DirectEvent handlers like Success.
    Thanks! I was able to access the server parameter myParam of ExtraParamsResponse on the client:

            protected void Button1_Click(object sender, DirectEventArgs e)
            {
                Ext.Net.Parameter myParam=new Ext.Net.Parameter("myParam", "123");
                e.ExtraParamsResponse.Add(myParam);
            }
    <ext:Button ID="Button1" runat="server" Text="Click Me">
    	<DirectEvents>
    		<Click OnEvent="Button1_Click" Success="var myParam=result.extraParamsResponse.myParam;">
    		</Click>
    	</DirectEvents>
    </ext:Button>
    Please mark this thread as closed.

Similar Threads

  1. Replies: 5
    Last Post: Mar 19, 2014, 3:35 AM
  2. Replies: 4
    Last Post: Jul 25, 2012, 5:45 AM
  3. Replies: 1
    Last Post: Jun 09, 2011, 7:04 PM
  4. [CLOSED] MVC FileContentResult With DirectEvent Parameters
    By paulc in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Jun 09, 2011, 4:37 AM
  5. [CLOSED] DirectEvent Parameters (Multiple)
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 09, 2010, 8:38 PM

Tags for this Thread

Posting Permissions