I think I found a flaw in the logic to get the first editable column when adding a new row to a grid. I have a grid where the visibility of the first column is toggled on and off based on another control on the page. When the first column is hidden and the button is clicked to add a new row the first cell is not given focus. I traced this through the code and came to this function:
It looks like there should be a check for !column.hidden as part of the if condition so that we don't try to set the focus to a cell in a hidden column. Let me know if that seems correct or if there's a different way I should be handling this situation. Thanks!
Regards,
Brian
_firstEditableColumnIndex: function(container) { var that = this, column, columns = that.columns, idx, length, model = that._modelForContainer(container); for (idx = 0, length = columns.length; idx < length; idx++) { column = columns[idx]; if (model && (!model.editable || model.editable(column.field)) && !column.command && column.field) { return idx; } } return -1;},It looks like there should be a check for !column.hidden as part of the if condition so that we don't try to set the focus to a cell in a hidden column. Let me know if that seems correct or if there's a different way I should be handling this situation. Thanks!
Regards,
Brian