¡Hello community! I have two simple questions regarding infragistics, I researched quite a lot but couldn't find a solution.
The first one: ¿How can I detect and manipulate the collapsability of rows in a Hierarchical Grid? I would need it to answer to javascript triggers.
The second one: In the child rows, there is an editable column that is a simple checkbox. The thing is that it changes state when clicking anywhere in the cell, I would need it to change only when clicking the checkbox.
Thanks and have a nice weekend!
Hello Marcos,
After investigating this further, I determined that collapsing and expanding rows in igHierarchicalGrid could be handled with the rowCollapsing and rowExpanding events. Both events could be canceled by returning false:
rowCollapsing: function(evt, ui){
return false;
},
Additionally, rows could be expanded and collapsed by using the expand and collapse methods:
var parentGrid = $("#hierarchicalGrid").igHierarchicalGrid("rootWidget");
var rowDomElement = parentGrid.rowAt(0);
$("#hierarchicalGrid").igHierarchicalGrid("expand", rowDomElement);
Furthermore, by setting editorType of a column to checkbox, clicking outside the checkbox does not change its value:
{
name: "Updating",
showDoneCancelButtons: false,
columnSettings: [
columnKey: "Available",
editorType: "checkbox",
}
]
Please let me know if you need any further information regarding this matter.
Regards, Monika Kirkova, Infragistics
Good afternoon Monika,
Thank you so much for your response. I could solve the problem of collapsing and uncollapsing rows. I could not solve the problem of checkboxes. Still if I click outside the box the value gets updated. Maybe there is something I am missing?
DataGridList.childGridSettings($('#dataGrid'), { features: [ { "name": "Resizing", "inherit": true, "columnSettings": [] }, { "name": "Selection", "activation": false, "mode": "row", "mouseDragSelect": false, "multipleSelection": true, "inherit": true, "columnSettings": [] }, { "name": "RowSelectors", "enableRowNumbering": false, "enableCheckBoxes": false, "inherit": true, "columnSettings": [] }, { name: "Updating", enableAddRow: false, editMode: "cell", enableDeleteRow: false, columnSettings: [ { columnKey: "Include", editorOptions: { type: "bool", disabled: false }, editorType: "checkbox" /*columnKey: "Include", editorType: "checkbox"*/ } ], editCellStarting: function (evt, ui) {
if ((ui.rowAdding == false) && (ui.columnKey == "ConceptName")) { return false; } } } ] });