hi,
I have an editable grid with 35 rows of data ( 5 columns editable), I have a requirement that given , if I edit something in any row , it should get saved in the database but shouldn't use any selection check box ,
there is only one button, that should save all the rows that are edited at one click
I wanted to save only the rows that are edited . Each row has a primary key.Any idea or code samples will help
Discussion posts and replies are publicly visible
Hello kowsalyavijayan
What is the type of data?
local!displayitems:rule!expression(id:ri!id).. this expression is querying data from a table (recordtype)
You can try using a refresh variable with the same data for your grid data. The main local would contain your actual data and the second local would reference your 1st variable in a refreshVariable. call this refresh variable in the grid data and on the button click you save the difference() of your gridData and the 1st local variable.
local!variable1: rule!actualData(), local!variable2: a!refreshVariable( value: local!variable1, refreshAlways: false() ), a!gridLayout(a!foreach(items: local!variable2,expression:{})), a!buttonWidget( saveinto: a!save( ri!record, difference(local!variable2, local!variable1) ) )
okay I will try
it works. I've been following all the solutions you give , I appreciate your expertise in this technology.