Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8070773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:30:23+00:00 2026-06-05T13:30:23+00:00

I’m currently testing the Kendo UI MVC Extensions Beta. I’m trying to implement a

  • 0

I’m currently testing the Kendo UI MVC Extensions Beta.
I’m trying to implement a double click – edit but I don’t know how I can get the rowId.

JavaScript:

$('#GridPedidos table tr').live('dblclick', function () {
    alert(' grid dbl clicked');
});

View:

@(Html.Kendo().Grid(Model) _
.Name("GridPedidos") _
    .Columns(Sub(column)
                 column.Bound(Function(item) item.idPedidoDocumentacao).Width("5%")
                 column.Bound(Function(item) item.descEstadoPedidoDoc).Width("25%")
                 column.Bound(Function(item) item.descTipoPedidoDoc).Width("25%")
                 column.Bound(Function(item) item.data).Width("25%").Format("{0:dd-MM-yyyy}")
                 column.Command(Function(item) item.Destroy()).Width("10%")
             End Sub) _
    .DataSource(Sub(ds)
                    ds.Ajax().ServerOperation(False).Read(Sub(s)
                                                              s.Action("GetListaGrid", "listaPedidos")
                                                          End Sub).Create(Sub(s)
                                                                              s.Action("detalhePedido", "Pedidos")
                                                                          End Sub).Model(Sub(m)
                                                                                             m.Id(Function(p) p.idPedidoDocumentacao)
                                                                                         End Sub).Destroy(Sub(d)
                                                                                                              d.Action("apagaPedido", "listaPedidos")
                                                                                                          End Sub)
                End Sub) _
    .Selectable()
)

I can detect the double click with this function, but how do I get the id?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:30:24+00:00Added an answer on June 5, 2026 at 1:30 pm

    I’ve done this example with client side api and an equivalent with the MVC extensions.

    Create a grid div, to create a grid at run time.

    <div id="grid" style="width: 400px;"></div>
    

    Created a row template so that I could give the element an id tag.

    <script id="rowTemplate" type="text/x-kendo-tmpl">
      <tr>
          <td id="EmployeeId">
            ${ EmployeeID }
          </td>
          <td>
            ${ FirstName }
          </td>
          <td>
            ${ LastName }
          </td>
      </tr>
    </script>
    

    Initialize the grid and bind data.

    <script>
      $(document).ready(function () {
          $("#grid").kendoGrid({
              columns: [
                  "EmployeeID"
                  ,{
                      field: "FirstName",
                      title: "First Name"
                  },{
                      field: "LastName",
                      title: "Last Name"
                  }
              ],
              dataSource: {
                  data: [
                      {
                          EmployeeID: 0,
                          FirstName: "Joe",
                          LastName: "Smith"
                      }, {
                          EmployeeID: 1,
                          FirstName: "Jane",
                          LastName: "Smith"
                      }
                  ],
                  schema: {
                      model: {
                          id: "EmployeeID",
                          fields: {
                              EmployeeID: {type: "number" },
                              FirstName: { type: "string" },
                              LastName: { type: "string" }
                          }
                      }
                  },
                  pageSize: 10
              },
              scrollable: {
                  virtual: true
              },
              sortable: true,
              pageable: true,
              rowTemplate: kendo.template($("#rowTemplate").html())
          });
    
          //Add a double click event that will return the text in the EmployeeId column.
          $('#grid table tr').dblclick(function () {
              alert($(this).find("td[id=EmployeeId]")[0].innerText);
          });
      });
    </script>
    

    –EDIT–

    I’ve also gone ahead and created an MVC extensions example, the approach is the same via the template route.

    Model class:

    public class Employee
    {
        public int EmployeeId { get; set; }
        public string Name { get; set; }
    }
    

    View code:

    <script type="text/javascript">
        function OnDataBound() {
            $('#OtherGrid table tr').dblclick(function () {
                    alert($(this).find("span[id=EmployeeId]")[0].innerText);
            });
        }
    </script>
    
    
    @(Html.Kendo().Grid<Employee>()
         .Name("OtherGrid")
         .Columns(columns =>
         {
             columns.Bound(p => p.EmployeeId).ClientTemplate("<span id=\"EmployeeId\">#: EmployeeId #</span>");
             columns.Bound(p => p.Name);
         })
         .DataSource(dataSource => dataSource
             .Ajax() // Specify that the data source is of ajax type
             .Read(read => read.Action("GetEmployees", "Home")) // Specify the action method and controller name
         )
         .Events(e => e.DataBound("OnDataBound"))
    )
    

    Controller:

    public ActionResult GetEmployees([DataSourceRequest]DataSourceRequest request)
    {
        List<Employee> list = new List<Employee>();
        Employee employee = new Employee() { EmployeeId = 1, Name = "John Smith" };
        list.Add(employee);
        employee = new Employee() { EmployeeId = 2, Name = "Ted Teller" };
        list.Add(employee);
    
        return Json(list.ToDataSourceResult(request));
    }
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.