[CLOSED] MVC Razor GridPanel Row DoubleClick

  1. #1

    [CLOSED] MVC Razor GridPanel Row DoubleClick

    Hi,

    I have a GridPanel in my view that I want to "wire-up" the row double-click event for.

    Whenever the user double clicks a row on the grid, I want to call a Direct Event on my controller and pass the Id (in the extra parameter?). This Id is the record id (and a hidden column in the grid).

    Can you provide some sample code (MVC and Razor) to do this?

    Thanks,
    Leo
    Last edited by Baidaly; Jul 24, 2013 at 11:15 PM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by leonardm View Post
    Hi,

    I have a GridPanel in my view that I want to "wire-up" the row double-click event for.

    Whenever the user double clicks a row on the grid, I want to call a Direct Event on my controller and pass the Id (in the extra parameter?). This Id is the record id (and a hidden column in the grid).

    Can you provide some sample code (MVC and Razor) to do this?

    Thanks,
    Leo
    I figured it out: Here's the code fragment

    @(X.GridPanel()          
              .Layout(LayoutType.Fit)         
              .Border(false)
              .BodyBorder(0)
              .DirectEvents(de =>
                    {
                        de.ItemDblClick.Url = "/List/Details";
                        de.ItemDblClick.CleanRequest = true;
                        de.ItemDblClick.Method = HttpMethod.GET;                   
                        de.ItemDblClick.ExtraParams.Add(new Parameter("id", "record.get('Id')", ParameterMode.Raw));
                    })
    
    ....
    Last edited by Baidaly; Jul 24, 2013 at 11:14 PM.
  3. #3
    Hello!

    Thank you for your update and solution. Please, don't forget to wrap your code in CODE tag.

    Thank you!

Similar Threads

  1. [CLOSED] Prevent row doubleclick on specific column
    By CarWise in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 15, 2013, 2:45 PM
  2. Replies: 2
    Last Post: Jul 02, 2012, 6:15 PM
  3. [CLOSED] [Razor] Add GridView to GridPanel in razor
    By boris in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2012, 4:23 PM
  4. [CLOSED] Is it possible to handle doubleclick event on a tab
    By anup in forum 1.x Legacy Premium Help
    Replies: 17
    Last Post: Feb 02, 2011, 6:47 PM
  5. How to add a doubleclick event in texfield?
    By Barbar in forum 1.x Help
    Replies: 0
    Last Post: Oct 17, 2008, 12:58 PM

Tags for this Thread

Posting Permissions