Skip to content Skip to sidebar Skip to footer

Dojo Grid - Switching Between Editable And Not Editable

I have a grid that will edit small chunks of data based on a larger tree structure. In order to make it easier to know what's being saved by the user, I want to have the grid be in

Solution 1:

Figured this one out (though it took a bit). Turns out, that when you click on an entry in an editable grid, the grid goes into an editing state. (Makes sense.) However, when I saved the data store while the grid was in an editing state, it didn't change the state of the grid. The next time I clicked on edit and brought the grid back to where I thought I could start editing, the grid thought it was still editing the previously selected cell, and would only send that cells information.

When I put the following code at the beginning of my saveTable and cancelTable methods, all worked as expected:

if (containerGrid.edit.isEditing()) {
     containerGrid.edit.apply();
}

Hopefully, this answer can save someone else some time later.

Thanks.

Post a Comment for "Dojo Grid - Switching Between Editable And Not Editable"