This is a migrated thread and some comments may be shown as answers.

Issues in kendo hierarchical grid

1 Answer 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thirumurthi
Top achievements
Rank 1
Thirumurthi asked on 05 Apr 2013, 09:57 AM
   I am using  kendo hierarchical grid.  Both parent and child grid rows are editable.  ( Sample : http://jsfiddle.net/hAsE3/2/  )
Here  with I have list out some requirement and issues.

1. How to access parent (master grid) row details from detail grid column.
  E.g: To get primary key value of the master grid row from child row.

2. Not able add new record in a Child grid when apply filter as,

      filter: [{
            "logic": "or",
                "filters": [{
                field: "EmployeeID",
                operator: "eq",
                value: e.data.EmployeeID
            }]
        }]

3. How to get the child grid datasource from Hierarchical grid.




Thanks and Regards,
Thirumurthi


1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 09 Apr 2013, 09:13 AM
Hi Thirumurthi,

Regarding your questions:
  1. The parent item is available in the detailInit event. In case you need to obtain it at a later point, you have to find the master row element /closest(".k-master-row")/, get its uid /masterRow.data("uid")/ and use the getByUid method of the DataSource to retrieve the dataItem. 
  2. In this forum post, you will find an explanation why this behaviour occurs and what are the possible workarounds. Please check it and let me know if you have any further questions.
  3. Through the dataSource field of the Grid widget. Note that the template is rendered multiple times, you cannot use the same ID each time as it will result in having invalid HTML.
    $("<div id='detgrd'/>").appendTo(e.detailCell).kendoGrid({

    You should either generate a different ID each time a new detail is initialized or select the Grid by class (k-grid).

I hope this will help.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Thirumurthi
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or