Title: Change attributes for a specific column on a specific row Post by: daniel_john on November 08, 2016, 06:28:38 AM Hi.
I need to change a specific column of a "Parent" grid if a value is changed in one of the "Child" grid's rows. Needless to say that this is for an editable grid and a gridview. I am able to change a specif column of all rows of the relevant "Parent" grid. This is my code: var thisGrid = $(this).datagrid('getSelfGrid'); // Get the grid that this row belongs to var dgParent = thisGrid.datagrid('getParentGrid'); // Get the parent grid of this grid var ndx = $(this).datagrid('getParentRowIndex'); // Get the index of the row of the parent grid that this row belongs to var parentRow = $('dgInv').datagrid('selectRow', ndx); // Get the actual row of the parent grid var parentColumn = parentRow.datagrid('getColumnOption', 'EditComment'); // Get the specific column parentColumn.editor = null; // Make it "not editable" ---- This should only affect the specific column and not all the columns in the grid Any help will be greatly appreciated. Title: Re: Change attributes for a specific column on a specific row Post by: stworthy on November 10, 2016, 04:34:27 AM You can call 'getColumnFields' method to get all the column fields and then empty their 'editor' properties. Please try this code:
Code: var fields = dg.datagrid('getColumnFields'); |