Using RecNo in OnCalcFields

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
RaThek
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 22.01.2014, 16:56

Using RecNo in OnCalcFields

Post by RaThek »

Hi everyone,

I have code like this in OnCalcFields event:

Code: Select all

  DataSet.FieldByName('sspec_lp').AsInteger :=
    DataSet.RecNo;
But when I use this part of code there are strange results (index column) in DBGrid (and in the dataset I suppose)
Image

Without using this part of code everything is fine and looks like this:
Image

It seems like passing RecNo value to some dataset field mess up dataset.
How can I solve it?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Using RecNo in OnCalcFields

Post by marsupilami »

Hello RaThek,

why would you use RecNo in the dataset? Do you try to sort by the RecNo field?
Best regards,

Jan
Post Reply