- edited description
TObjectDataSet - new record is not current after post
Issue #268
on hold
When new record is added to the Sorted dataset, after post is not guaranted that the new records is current. Same thing migh happen after update as well.
The InternalSetSort may change the order of the items in the list. But at the end of the procedure the position is set to the original one (before sort).
The position has to be set to the actual position of the posted record (see the modification below)
procedure TObjectDataSet.DoPostRecord(Index: Integer; Append: Boolean);
begin
if Sorted and sortNeeded then
InternalSetSort(Sort, Index);
// Locate correct position
Index := IndexList.IndexOf(newItem);
SetCurrent(Index);
end;
Comments (4)
-
reporter -
reporter - edited description
-
repo owner Sorting and filtering is currently hopelessly broken and fixing that is honestly very low on my priority list.
-
repo owner - changed status to on hold
Postponed until someone with enough knowledge in this subject contributes or joins.
- Log in to comment