Hello all,
I have a grid on a form, and when i add a new record on a grid i want the grid to be order based on a field( "A lung" in my example)
If i add this row, this field (4<6) , i need this row to go the second record not the third. I added this code on onInitialized() of datasource :
FormRun formRun= sender.formRun();
Object bfpProdRollQCMappingDetailTmp_ds = formRun.dataSource(formDataSourceStr(bfpProdRollQc, bfpProdRollQCMappingDetailTmp)) as FormDataSource;
bfpProdRollQCMappingDetailTmp_ds.queryBuildDataSource().addSortField(fieldNum(bfpProdRollQCMappingDetailTmp, PositionYTo));

The rows are ordered only if i do refresh manually, otherwise no. I tried to add refresh(), reread() , research() of the datasource but still does not work.
Thank you in advance.