Page 1 of 1

editing Tmyquery cause too many selected rows

Posted: Tue 26 Aug 2008 15:10
by iskywalker
Hi!
I am expericencing an annoying bug:
Using a crgrid and a tmyquery:
The crgrid should be sorted a by a column then
when editing an entry of Tmyquery of the column with edit and post the entry will "jump" eventually depending on the sorting and the surrounding entries. the new entry will be selected and set nicely so it can be reached by gotobookmark, the old entry remains but as selected.currentrow= true and so it may mark double as really selected entries.
I happens only with multiselected row evidently.
Any clue how can i avoid it?
thx in advance

Posted: Wed 27 Aug 2008 11:47
by iskywalker
seems that

function TMemData.CompareBookmarks(Bookmark1, Bookmark2: PRecBookmark): integer;
...
begin
...
//iskywalker
// Compare by order
// Result := inherited CompareBookmarks(Bookmark1, Bookmark2);
end;

the last line:
Result := inherited CompareBookmarks(Bookmark1, Bookmark2);
seems to be the problem.
Why is it needed?

Posted: Wed 27 Aug 2008 13:42
by Dimon
I could not reproduce the problem.
Please send me a complete small sample at dmitryg*devart*com to demonstrate it, including script to create and fill table.