how can use hierarchy kendo grid and filter component

3 posts, 0 answers
  1. soroush
    soroush avatar
    9 posts
    Member since:
    Jan 2017

    Posted 29 May 2020 Link to this post

    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()
    )
  2. soroush
    soroush avatar
    9 posts
    Member since:
    Jan 2017

    Posted 29 May 2020 in reply to soroush Link to this post

    plz help me admin-progress team. I asked this question a few weeks ago, but instead of answering to the question, you deleted my question!! Please help me how to solve this problem. You will help me well with an example. thank you
  3. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    1082 posts

    Posted 03 Jun 2020 Link to this post

    Hello, Soroush,

    The question that you asked was indeed in a forum post but it was not deleted, we transferred it to a private support thread and you can find it by going to your account:

    https://www.telerik.com/account/support-tickets/view-ticket/1467688

    The private thread above currently has another 21 hours before it is delayed and you should receive a response before the response time on it is up.

    As a trial client, you are entitled to unlimited questions for the duration of the trial, however the response time for trial clients is up to 72 hours during business opening days(Monday-Friday). This is because we must prioritize clients with active licences who may have a 4 hour pre-screening or up to 24 hours for most cases.

    For more information about the available licences and the response times, you can check this link:

    https://www.telerik.com/purchase/kendo-ui

    Kind Regards,
    Alex Hajigeorgieva
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top