Page 1 of 1

Using RecNo in OnCalcFields

Posted: 22.10.2014, 13:22
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?

Re: Using RecNo in OnCalcFields

Posted: 16.12.2014, 19:41
by marsupilami
Hello RaThek,

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

Jan