hi, please help me!
i have a igHierarchicalGrid here!
var reportTemplate = data.ReportTemplate; $("#grdReportTemplate").igHierarchicalGrid({ //initialDataBindDepth: 1, dataSource: reportTemplate, //dataSourceType: "json", //responseDataKey: "d", autoGenerateColumns: false, primaryKey: "RecordID", width: "100%", height: "500px", renderCheckboxes: true, columns: [ { headerText: "RecordID", key: "RecordID", width: "50px", dataType: "number", hidden: true }, { headerText: "ReportID", key: "ReportID", width: "130px", dataType: "number", hidden: true }, { headerText: "ParentReportID", key: "ParentReportID", width: "50px", dataType: "number", hidden: true }, { headerText: "Select", key: "IsChecked", width: "80px", dataType: "bool" }, { headerText: "ReportDsc", key: "ReportDsc", width: "130px", dataType: "string" }, { headerText: "ReportFileName", key: "ReportFileName", width: "50px", dataType: "string", hidden: true }, { headerText: "Object Type", key: "ObjectType", width: "50px", dataType: "number", hidden: true } ], autoGenerateLayouts: false, defaultChildrenDataProperty: "oReport", columnLayouts: [ { name: "oReport", childrenDataProperty: "oReport", //autoGenerateColumns: false, responseDataKey: "oReport", primaryKey: "RecordID", ForeignKey: "ParentReportID", renderCheckboxes: true, columns: [ { headerText: "RecordID", key: "RecordID", width: "50px", dataType: "number", hidden: true }, { headerText: "ReportID", key: "ReportID", width: "130px", dataType: "number", hidden: true }, { headerText: "ParentReportID", key: "ParentReportID", width: "50px", dataType: "number", hidden: true }, { headerText: "Select", key: "IsChecked", width: "80px", dataType: "bool" }, { headerText: "ReportDsc", key: "ReportDsc", width: "400px", dataType: "string" }, { headerText: "ReportFileName", key: "ReportFileName", width: "50px", dataType: "string", hidden: true }, { headerText: "Object Type", key: "ObjectType", width: "50px", dataType: "number", hidden: true } ], features: [ { name: "Updating", enableAddRow: false, editMode: "row", enableDeleteRow: false, showDoneCancelButtons: false, columnSettings: [ { columnKey: "IsChecked", editorOptions: { type: "bool", disabled: false } }, { columnKey: "ReportDsc", editorOptions: { type: "string", disabled: true } } ] }], } ], features: [ { name: "Updating", enableAddRow: false, editMode: "row", enableDeleteRow: false, showDoneCancelButtons: false, columnSettings: [ { columnKey: "IsChecked", editorOptions: { type: "bool", disabled: false } }, { columnKey: "ReportDsc", editorOptions: { type: "string", disabled: true } } ] }], });
i loop all record of grid to get ReportID if column IsChecked= true but i can not get child record of grid
updates1 = $.extend({}, grid1.data('igGrid').pendingTransactions()); var lsTemplateChecked = ""; $.each(updates1, function (index, transaction) { switch (transaction.type) { case "row": if (transaction.row.IsChecked == true && transaction.row.ObjectType == 1) { if (lsTemplateChecked == "") { lsTemplateChecked = transaction.row.ReportID; } else { lsTemplateChecked = lsTemplateChecked + "," + transaction.row.ReportID; } } break; } });
How can i get column of igHierarchicalGrid above?
Thanks you very much!!
Hello Cuong,
You may get the desired column of the child grid using some of the following API methods: columnByKey or columnByText
As you need to specify the correct selector for the child grid in order these methods to return the child grid columns, not the parent one. In order to get the child grid container id, you may inspect the child grid table on the client using browser's developer tools.
If you need further assistance, please let me know.
Regards,
Tsanna
your explain to short (perhap, i don't register product) and now i registed
one thing, i'm from Việm Nam so my english not too good. so please explain enought clearly to understand
return my question
in my code i can loop into all pedingtransaction record of parent
i want to do something like with child record
please help me!
thanks u very much!
Hello Coung,
Can I help you with anything else?
thanks you very much!
it very helpful
it done
one again thanks you very much!!