Page 1 of 1

New inserted record ignores sort order

Posted: Mon 18 Oct 2010 11:25
by BlueMoon
Hi,

I use a DBNavigator, a DBGrid and a IBCTable. When I insert a new record than the record is inserted one row above the cursor in the DBGrid. Afer post the record stays at this position. My table and DBGrid is ordered by the first field called Date. I want to have the new record at the correct position. How to to do this? Why is the record not inserted at the right position?

Posted: Tue 19 Oct 2010 08:55
by AndreyZ
Hello,

You should put an index into the IBCTable.IndexFieldNames property. Here is an example:

Code: Select all

IBCTable.IndexFieldNames := 'Date';

Posted: Tue 19 Oct 2010 10:05
by BlueMoon
Good! That works. Thanks!

Posted: Tue 19 Oct 2010 11:22
by AndreyZ
I am happy that this problem has been solved. If any other questions come up, please contact me.