Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
Iluminación alta de fila de vista de cuadrícula de Kendo

Estoy usando la vista de cuadrícula de kendo con una columna de lista desplegable. Debe resaltar la fila una vez que el usuario seleccione cualquier valor en la lista desplegable.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Intente agregar una clase css al tr :

 <!DOCTYPE html> <html> <head> <base href="https://demos.telerik.com/kendo-ui/grid/local-data-binding"> <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style> <title></title> <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2021.3.1109/styles/kendo.default-main.min.css" /> <script src="https://kendo.cdn.telerik.com/2021.3.1109/js/jquery.min.js"></script> <script src="https://kendo.cdn.telerik.com/2021.3.1109/js/kendo.all.min.js"></script> <style type="text/css"> tr.highlight { background-color: #f55; } </style> </head> <body> <script src="../content/shared/js/products.js"></script> <div id="example"> <div id="grid"></div> <script> $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { data: products, schema: { model: { fields: { ProductName: { type: "string", editable: false }, UnitPrice: { type: "number", editable: false }, UnitsInStock: { type: "number", editable: false }, Discontinued: { type: "boolean", editable: true } } } }, pageSize: 20 }, height: 550, scrollable: true, sortable: true, filterable: true, editable: true, pageable: { input: true, numeric: false }, columns: [ "ProductName", { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "130px" }, { field: "UnitsInStock", title: "Units In Stock", width: "130px" }, { field: "Discontinued", width: "130px", editor: ($cell, e) => { $('<select>' + '<option' + (e.model.Discontinued ? ' selected="selected"' : '') + '>True</option>' + '<option' + (!e.model.Discontinued ? ' selected="selected"' : '') + '>False</option></select>') .appendTo($cell) .on('change', function (dataItem, $cell, e) { dataItem.Discontinued = ($(e.target).val() === 'True'); // Highlight code $cell.closest('tr').addClass('highlight'); }.bind(null, e.model, $cell)); } } ] }); }); </script> </div> </body> </html>

Dojo

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!