3.0.0

Cell data retaining old values - not showing new values from xml table

Hi,

We have a grid which has some editable/derived columns (hence values in their cells change after load based on user input) and other non editable cells. Once loaded users can customise the grid based on preferences screen that we have provided.So users can select the columns that they want to see and change the column orders. Once user saves the preferences screen (which is a popup on top of grid screen) we are reflecting the required changes in the grid without doing any grid/page refresh. All we are doing is setting the new set of columns on XML table and grid is getting updated correctly with correct data in all columns.
Only issue is that any cell text that users might have updated before changing grid preferences is not getting rerendered again i.e. they are retaining their text and not getting the correct cell text corresponding to new column at that place.Hopefully following will make our problem clear -

Before preferences change -
x
Salary
y-1 100000
y 160000
y+1 200000

after preferences change (actual) -
x
Department
y-1 Purchase
y 160000
y+1 Finance

after preferences change (expected/desired) -
x
Department
y-1 Purchase
y HR
y+1 Finance

So before at index x column was Salary and user updated the cell at x,y. Then user changes the preferences and column Department starts appearing at index x,then all cell text is appearing for this new column minus the cell at x,y which was updated the user before preferences change.

We tried refreshing the column, even grid but that did not solve the problem. Refreshing the page will offcourse work but that will be unacceptable to business.

We tried digging in and found that getCellValue/Data actually gives correct value that is HR. But getcellText is 160000.

Please suggest are we going wrong.Or, suggest some workarounds.

Regards,

Girish Khemani, Fidelity India
August 7,
We have the exact same problem too. In our application, Column 1 is editable - the new value gets submitted to the server by hooking into the OnCellValidated event. After the value submission, we get back the changed XML from the server and refresh the grid with the new values. All columns display the latest values except for the cell that was edited.

Once a cell gets edited it tends to retain its text even after subsequent grid refreshes. I have verified that the underlying XML table contains the correct values.

Any help appreciated.

Thx.
Subha
August 7,
After editing a cell and refreshing the XMLDataTable, and before refreshing the grid, if I call grid.setCellModel(XMLDataTable) again, the weird problem with editing went away. I am not sure if this is the right thing to do but it works.

Subha
August 7,
When you edit text in some cells the text stays in cell text property. You should either clear each one - setCellText(undefined, col, row) - or clear everything in cell model - clearCellModel().
Alex (ActiveWidgets)
August 8,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.