Refresh grid, keep user selections


I have a problem. I have a grid with multiple selection enabled. User select rows and after click on a button. Some updates are made on records. When codes are completed i want to refresh my grid with the new values, but i want to keep user selection. I need the value to be print immediatly and not after the user change field or line.

I tried something like that :

void RefreshSalesLineDS()
// Déclaration des variables
SalesLine tblSL;



for (tblSL = SalesLine_ds.getFirst(true) ? SalesLine_ds.getFirst(true) : SalesLine_ds.cursor(); tblSL; tblSL = SalesLine_ds.getnext())

this gives me the best result so far. But sometimes with the same selection, the grid is not refresh ! But sometime yes ! I dont understand why !

But that’s my first problem, when codes dont print any info,warning, nothing is refresh. I think I try all combination with refresh(), reread() on my datasource.

Thanks for your help.


Please go through this link. Hope this will help you