This is a migrated thread and some comments may be shown as answers.
conditional color in details Row with master row data
2 Answers 5 Views
This is a migrated thread and some comments may be shown as answers.
pcs2
Top achievements
Rank 1
pcs2 asked on 26 Mar 2021, 05:23 AM

Hi

 

I use an master detail Grid..I need to change detail data table text color conditionnaly to master row ?

Could you help me

Thanks

2 Answers, 1 is accepted

Sort by
0
pcs2
Top achievements
Rank 1
answered on 26 Mar 2021, 06:10 AM

Hi

I have found an solution, but perhaps i could avoid item loop ?

dataBound:function(e){

var masterRow = this.wrapper.closest("tr.k-detail-row").prev(".k-master-row");
var masterGrid = $("#JGrid").data("kendoGrid");

var masterDataItem = masterGrid.dataItem(masterRow);

if ( masterDataItem.isDestroy) {
var items = e.sender.items();
items.each(function (index) {
this.className += " noCapRed";
})
}
}

 

Regards

0
Anton Mironov
Telerik team
answered on 30 Mar 2021, 02:55 PM

Hi,

Thank you for sharing the approach with the community.

I confirm that this one is the recommended approach. This is the way to set the required class to all items in the Detail Grid.

If anything else is needed, do not hesitate to contact me and the team.

Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
pcs2
Top achievements
Rank 1
Answers by
pcs2
Top achievements
Rank 1
Anton Mironov
Telerik team
Share this question
or