Hello,
I'm a beginner in kendo ui.
I'm trying to work on a hierarchical grids.
I'm able to get the parent rows to load fine, however, the child rows are all loaded without considering the filter .
Here's the code I'm attempting to run:
<
div
class
=
"container"
id
=
"example"
>
<
div
id
=
"Div1"
>
<
div
id
=
"grid"
>
</
div
>
<
script
>
$(document).ready(function () {
var element = $("#grid").kendoGrid({
dataSource:
{
transport:
{
read: { url: "api/Clients", dataType: 'json'},
},
pageSize: 6,
serverPaging: true,
serverSorting: true,
},
height: 600,
sortable: true,
pageable: true,
detailInit: detailInit,
columns:
[
{ field: "Code_Client" },
{ field: "Nom_Client"},
{ field: "Groupe" },
{ field: "Cote" },
{ field: "Marche" }
]
});
});
function detailInit(e) {
$("<
div
/>").appendTo(e.detailCell).kendoGrid({
dataSource: {
transport:
{
read: { url: "api/Clients", dataType: 'JSON'}
},
serverPaging: true,
serverSorting: true,
serverFiltering: true,
pageSize: 10,
filter: {field: "Code_Client", operator: "eq", value: e.data.Code_Client }
},
scrollable: false,
sortable: true,
pageable: true,
columns: [
{ field: "Refere" },
{ field: "Nb_Employe" },
{ field: "Ca" },
{ field: "Type" },
{ field: " Commentaires" },
{ field: "Sous_Secteur" },
{ field: "Contact" },
{ field: "Adresse" },
{ field: "Téléphone" }
]
});
}
</
script
>
</
div
>
</
div
>
Thank you,