Hey guys,
I just built a listgrid which allows grouping. The listgrid further has disabled “autoSaveEdits”. Next to it I implemented a save button, which shall save all edits when pressed by the user.
The problem here is, when groupBy is active and the user changes some fields, the method listGrid.getAllEditRows() will answer an empty Array, instead of all changed rows / records.
The following gif shows a scenario like that:
1. Pressing the changedRowsButton
=> No changes
2. Start editing of the first row and press button
=> The changed rows includes the editing row
3. End editing by pressing “Return” and press the button
=> The changed rows doesn’t include the changed row anymore, but it doesn’t get saved meanwhile
4. Ungroup the listgrid and press the button
=> The changed rows again includes the changed row, so it seems to recognize the changed row
The follgowing gif starts shows the other way round, starting with an ungrouped listgrid
1. Pressing the changedRowsButton
=> No changes
2. Start editing the first row and press the button
=> The changed rows includes the editing row
3. End editing by pressing “Return” and press the button
=> The changed rows still includes the changed row contrary to the grouped list grid
4. Group the listgrid by name and press the button
=> The changed rows still includes the changed row
5. Collapse group of the changed row and press button
=> Changed rows are empty, but there is still the hidden changed row
To save all changes, I need a method to get all changed records. For regular listgrids I can use the listGrid.getAllEditRows() and afterwards search for these rows with listGrid.getRecord(). But when working with a grouped listGrid, this won’t work anymore.
So is there a way to get all changed records, regardless whether grouping is active or not?
This issue is reproducable in all current browsers (Chrome, Firefox & IE) and your latest nightly build SmartClient_v10.0p_2015-03-09.
Best Regards
I just built a listgrid which allows grouping. The listgrid further has disabled “autoSaveEdits”. Next to it I implemented a save button, which shall save all edits when pressed by the user.
The problem here is, when groupBy is active and the user changes some fields, the method listGrid.getAllEditRows() will answer an empty Array, instead of all changed rows / records.
The following gif shows a scenario like that:
1. Pressing the changedRowsButton
=> No changes
2. Start editing of the first row and press button
=> The changed rows includes the editing row
3. End editing by pressing “Return” and press the button
=> The changed rows doesn’t include the changed row anymore, but it doesn’t get saved meanwhile
4. Ungroup the listgrid and press the button
=> The changed rows again includes the changed row, so it seems to recognize the changed row
The follgowing gif starts shows the other way round, starting with an ungrouped listgrid
1. Pressing the changedRowsButton
=> No changes
2. Start editing the first row and press the button
=> The changed rows includes the editing row
3. End editing by pressing “Return” and press the button
=> The changed rows still includes the changed row contrary to the grouped list grid
4. Group the listgrid by name and press the button
=> The changed rows still includes the changed row
5. Collapse group of the changed row and press button
=> Changed rows are empty, but there is still the hidden changed row
To save all changes, I need a method to get all changed records. For regular listgrids I can use the listGrid.getAllEditRows() and afterwards search for these rows with listGrid.getRecord(). But when working with a grouped listGrid, this won’t work anymore.
So is there a way to get all changed records, regardless whether grouping is active or not?
This issue is reproducable in all current browsers (Chrome, Firefox & IE) and your latest nightly build SmartClient_v10.0p_2015-03-09.
Best Regards
Comment