My App has Grid and Navigator, and editing area using Edit.
Because I wanted to cancel editing/inserting data
if current row changed before posting,
I assinged SelectRow event handler for the grid like this:
delphi code
procedure TMyFrame.IWCGJQGrid1JQGridOptionsSelectRow(Sender: TObject;
AParams: TStringList);
begin
if Query1.State <> dsBrowse then Query1.Cancel;
IWCGJQGrid1.LocateSelectedRowId;
end;
When editing, this works well (in fact there are some problems but I don't mention now),
but when the row of the grid was changed by grid's paging button after inserting and before posting,
error message dialog was showed, so it seemed that Query1.Cancel was not executed.
I investigated, and found that the order of occurring event was different in some situation.
When the Query inserting,
if the grid's row was changed by clicking another row, SelectRow event occurs before Post event of Query,
but if changed by paging button, the occurrence order was reverse.
BTW, the paging button which I said is this:
I wonder why these are different.
Anyway, aren't there any other good means to resolve?