Add parametrs to directEvents

  1. #1

    Add parametrs to directEvents

    I need pass parametr "id" in Action.

                                        .ToolTip(t =>
                                            t.Text = "Modifica della ripartizione ferie per giorno";
                                        directEvents =>
                                                 directEvents.Command.Action = "Details";                            
    Action controller:

       // GET: Bob/Details/5
                public ActionResult Details(int id)
                    if (id == null)
                        return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
                    BobRepository bobRepository = new BobRepository();
                    Bob bob = bobRepository.GetBob(id);
                    return View(bob);
    How i can pass .ID("ID") in Action?
  2. #2
    I dont really use razor but this is is the old way of doing it. Note the ExtraParams on the click event. i am sure you easily translate to Razor like DirectEvent.Click.ExtraParams or something like that.
    Note the Mode variable. it is Raw or Value.
    Raw means it will execute the JS and find a value (very helpful)
    Value means just passes it as is
    Good Luck!

                                                        title:   'Error',
                                                        msg:     result.message || result.errorMessage,
                                                        buttons: Ext.Msg.OK,
                                                        icon:    Ext.MessageBox.ERROR
                                                    <EventMask MinDelay="250" />
                                                        <ext:Parameter Name="test" Value="App.someComponent.getValue()" Mode="Raw" />                                                    
  3. #3
    read this post from matrixwebtech

Similar Threads

  1. [CLOSED] DirectEvents : DirectEvents.Click.Before Wait message always show
    By matrixwebtech in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 27, 2015, 6:08 PM
  2. Replies: 1
    Last Post: Apr 04, 2014, 12:30 AM
  3. Replies: 10
    Last Post: Jan 31, 2014, 12:42 AM
  4. TreePanel Directevents
    By obiwan74 in forum 2.x Help
    Replies: 1
    Last Post: Jan 02, 2013, 6:00 AM
  5. Dynamic DirectEvents
    By Dominik in forum 1.x Help
    Replies: 3
    Last Post: Jul 30, 2010, 1:58 PM

Posting Permissions