Our blazing fast Grid component built with pure JavaScript


Post by thejas.pateel »

Hi ,
i am having 2 auto computed columns at first in paint event i am doing calculation and changing the cell value. when i done this i need to clear show dirty fields at initial .Please help me how to clear that .Store.commit is also not working .

dirty.jpg
dirty.jpg (3.39 KiB) Viewed 349 times

i need to clear this marked dirty fields to normal fields programatically whenever required ..Kindly help me out


Post by alex.l »

Hi, if these fields are calculated. you could make then not persisted, so they won't be marked as changed and won't sent back to server, since there is no need in that. https://bryntum.com/products/grid/docs/api/Core/data/field/DataField#config-persist

Another possible solution is to calculate and show value in renderer. So, there won't be needed to change actual record data, but only show value you need https://bryntum.com/products/gantt/docs/api/Grid/column/Column#config-renderer

Btw, commit does work for me here https://bryntum.com/products/grid/examples/celledit/
Try to change values in cells and call in console

grid.store.commit();

All the best,
Alex


Post by thejas.pateel »

Not working .please find another method please.Grid.store.comitt.we need to send back to server so persist also not work


Post by alex.l »

Hi thejas.pateel,

Am I right you want to have these fields as dirty, since you need to save values back to server, but you don't want to have it marked as dirty on UI. But for all others fields you want to have "dirty" label working as it was?

All the best,
Alex


Post by thejas.pateel »

Hi,
At initial stage these fields should not be dirty .after changing values its fine ,i need to send data back to server


Post by thejas.pateel »

Please provide VUE project step by step of grid commit .i need to see how its working in your side please .Because its not working from my side


Post by mats »

@thejas.pateel: Have you marked your calculated fields with persist : false

https://bryntum.com/products/grid/docs/api/Core/data/field/DataField#config-persist


Post by thejas.pateel »

No, but when i do that that fields is not posted to server right? is that fields comes in grid.store.records ?


Post by mats »

Ah, so it's a computed field that you want to store in your DB? And it's out of sync upon load, so you update it after load but it doesn't clear the dirty flag? How can we reproduce this?


Post by thejas.pateel »

Step 1: Load data through API
step 2: loop the rows and then change corresponding cell value
Step 4: after modified cell showing dirty.

IF i call grid.store.committe after that ,its not working


Post Reply