Is it possible to reference parent row data in the column template of a child row?
I have tried, for example: ${parent.ColumnKey}, but this doesn't work.
Further, the grid is bound to a DataSet of (2) related DataTables.
Hello Tsanna,
I am new to iggrid.
I checked the sample code for using iggrid as parent-child relationship.
But I haven`t got the right solution yet.
I want to use in the following way:
1. get data from server for parent grid
2. when i click the plus icon of the parent row, I have to use some of the parent`s row data as parameter to load the server data for child grid
For now, i can load data only for parent grid. And I am using rowexpanding event to load the data for child.
But, I don`t know :
1.how to get the parent row data by that event.
2 how to set the data source that I searched for child grid.
Thanks for your help!
Hello lwoodell,
Thank you for your raply.
I haven`t got the solution yet.
Thanks
I think the "data-id" row attribute is generated automatically when a primary key is assigned to the row, and correlates to the value of the PK.
In my example, I was dealing with a hierarchical grid bound to a dataset of related tables (PK/FK relation).
Hello lwoodell ,
I can`t call the ighierarchicalgridrowexpanding event when i click the plus icon of the parent row. So, I used the rowExpanding event as below:
rowExpanding : function(e, args) {
rowExpanding :
function
(e, args) {
var parentRow = args.parentrow;
args
var parentRowId = parentRow.attr("data-id");
var pk = $("#gridId").igGrid("getCellValue", parentRowId, "ColumnKey");
}
Then, I got the following error:
Cannot read property dataType of null in infragistics.lob.js
May I know what is the data-id in following line:
Thank you for sharing your solution with our community. It would be helpful to the other members.
If I can assist you with anything else, do not hesitate to contact me.
Regards,
Tsanna