Hi, I have readable grid in which i am using arrow icon, so if I click on that arrow so that row should go up and upper row should come down. I can get all data items from current row, but how I will get data from previous row, So I can apply swapping conditiin
Discussion posts and replies are publicly visible
You can us these code blocks in your
Down Arrow
a!save( ri!data, a!update( ri!data, { wherecontains(fv!row, ri!data), wherecontains(fv!row, ri!data) + 1 }, { ri!data[wherecontains(fv!row, ri!data) + 1], fv!row } ) )
Up Arrow
a!save( ri!data, a!update( ri!data, { wherecontains(fv!row, ri!data), wherecontains(fv!row, ri!data) - 1 }, { ri!data[wherecontains(fv!row, ri!data) - 1], fv!row } ) )
Hi, I am trying to implement the same logic with record type as a data for grid. Could you check the below and let me know here where am i making mistake
and this reordering should save in db with different column
why using fv!item in the remove function ?
EREN_YEAGER said:why using fv!item in the remove function ?
i agree, there are several things wrong here - it seems like "fv!row" has been incorrectly swapped out with "fv!item" in one specific instance in the screenshot, but even with all "fv!row" references, i'm not sure this will accomplish what AK is hoping to accomplish, since the save operation is being done on "fv!row" in general, which of course isn't the original array at all but instead only represents a pointer to a particular row in the supplied "data" dataset. So I'm not really sure what the screenshotted code is hoping to accomplish.