Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Kendo UI Style Grid Rows

$
0
0

using this in a hierarchy grid how could I change the rowstyle of the parent row, let me explain a litte more, I have a masterdetail grid which based on a condition I wanted the parent row change the background color to red.

This is my function it works but only in the details row, how to access to the master row and change it to backgrond red

 

   function onOrderDetailsDataBound(e) {
         var grid = this;
        var currentRecords = grid.dataSource.view();

        for (var i = 0; i < currentRecords.length; i++) {
            //currentRecords[i] is the current dataItem
            if (!currentRecords[i].Deducible) {
                grid.tbody.find("tr[data-uid='" + currentRecords[i].uid + "']").addClass("noDeducible");
              
            }
        }
    }

 

adding this code the results is: when the master row is expanded it turns red but I want to be in red and not be necessary to click it.

 

var parentRow = $(this).closest(".k-detail-row").prev(".k-master-row"); $(parentRow).addClass(".k-state-selected");

 

Any help? I'm using kendo mvc

 


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>