I assume you have a grid with a recordsourcetype 5 - sql statement?
Then the grid displays the query result, not the table, so picking a row in the grid does not change the record pointer position in the table, yes.
You'll have to position there in the Grids AfterRowColChange event via the primary key, for example, or set a RELATION from the grids alias to the table.
By the way, this recordsourcetype is rather avoided by me and I think by most of us here, you can do a query in code instead of sepcifying it as property value and that gives you much more flexibility and context, eg using variables in scope for paramterization.
Then you can bind the grid to the result of that code query. Running in the context and scope of the form itself and all its objects is more helpful than any other approach in my opinion, also in conjunction with subclassing forms or parts of it like data access classes. You can of cause also create a class hierarchy of grids but you can only override the query property in a subclass.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.