hi everyone. i use kendo grid in my asp.net core project v 2.1. i have 3 table person and wife and child. i want use kendo with hierarchy tables. primary table is person and second table is wife or child. for filter the kendo grid i use kendo Filter component (not kendo grid filter). i add first filter component for primary table (person table) and it works fine. i want add secondary filter component for wife table. how i should do this? plz help me thanks.
picture 1:
http://s13.picofile.com/file/8397544592/Screenshot_87_.png
picture 2:
http://s12.picofile.com/file/8397544768/Screenshot_89_.png
<
kendo-datasource
type
=
"DataSourceTagHelperType.Ajax"
name
=
"dataSource1"
server-operation
=
"true"
>
<
transport
>
<
read
url
=
"@Url.Action("
GetAllPerson", "Reports")" />
</
transport
>
<
schema
>
<
model
id
=
"PersonId"
></
model
>
</
schema
>
</
kendo-datasource
>
@(Html.Kendo().Filter<
DomainClasses.Person.Person
>()
.Name("filter")
.Operators()
.ApplyButton(true)
.Messages()
.DataSource("dataSource1")
.Fields(f =>
{
f.Add(p => p.PersonTypes).Label("Person Type");
f.Add(p=> p.PersonName).Label("Name");
f.Add(p => p.PersonFamily).Label("Family");
f.Add(p => p.PersonAliasName).Label("Alias Name);
f.Add(p => p.PersonFatherName).Label("Father Name");
f.Add(p => p.PersonBirthCertificate).Label("National Code");
f.Add(p => p.PersonCategory).Label("Category");
f.Add(p => p.PersonCounty).Label("City").DefaultValue(1).EditorTemplateHandler("getList");
})
)
@(Html.Kendo().Grid<
DomainClasses.Person.Person
>()
.Name("Grid")
.Columns(columns =>
{
columns.Select().Width(50);
columns.Bound(p => p.PersonId).Hidden();
columns.Bound(p => p.PersonTypes).Width(100);
columns.Bound(p => p.PersonName).Width(200);
columns.Bound(p => p.PersonFamily).Width(200);
columns.Bound(p => p.PersonAliasName).Width(150);
columns.Bound(p => p.PersonFatherName).Width(150);
columns.Bound(p => p.BirthDatePersian).Width(120);
columns.Bound(p => p.PersonProvince).Width(100);
columns.Bound(p => p.PersonCounty).Width(120);
columns.Bound(p => p.PersonVillage).Width(150);
columns.Bound(p => p.PersonStreet).Width(200);
columns.Bound(p => p.PersonEducation).Width(120);
columns.Bound(p => p.PersonBirthCertificate).Width(130);
})
.Pageable()
.Sortable()
.Scrollable()
.Groupable()
.Events(e=>e.Change("onChange"))
.DataSource("dataSource1")
.PersistSelection()
.ClientDetailTemplateId("spouseTemplate")
.Events(e => e.DataBound("dataBound"))
)
@(Html.Kendo().Grid<
DomainClasses.Spouse.Spouse
>()
.Name("grid_#=PersonId#")
.Columns(columns =>
{
columns.Bound(o => o.SpouseName).Width(200);
columns.Bound(o => o.SpouseFamily).Width(200);
columns.Bound(o => o.SpouseFatherName).Width(200);
columns.Bound(o => o.SpouseIsAlive).Width(150);
columns.Bound(o => o.SpouseHousingSituation).Width(150);
columns.Bound(o => o.SpouseAddress).Width(200);
columns.Bound(o => o.SpousePhone).Width(150);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Read(read => read.Action("GetSposes", "Reports", new { personId = "#=PersonId#" }))
)
.Pageable()
.Sortable()
.Filterable()
.HtmlAttributes(new {style="width:1300px;" })
.ToClientTemplate()
)