I want to allow users to set the order of records in a grid. I realize
that grid order is based upon the underlying records, so I have a
lineorder field that theoretically could set the order of the records.
Changing that field should automatically reorder the grid.

That would work, except that the grid is a child grid of a parent
record. The parent is a purchase order. The child is items on the
purchase order. To get the right child items, the order of the child
table needs to be set to ponumber. But to get the record order
correct, the index has to be set to lineorder. So I'm rather confused
as to how this would be done, if it can be done.

Any help would be appreciated.

Kevin Clark
Seton Home Study School

Re: Order of records in a grid by Dan

Dan
Wed Nov 01 18:07:13 CST 2006

Any time you have a parent-child relationship (as in SET RELATION), the
child must ALWAYS be ordered by the relational expression. That's
unchangeable.

This is a perfect situation for a parameterized view of the child records.
Make the view's parameter the parent's key value (purchase order), so that
the view only displays records for that parent. Then your grid can index the
child records any way it likes for display purposes.

Dan

KevClark64@hotmail.com wrote:
> I want to allow users to set the order of records in a grid. I
> realize that grid order is based upon the underlying records, so I
> have a lineorder field that theoretically could set the order of the
> records. Changing that field should automatically reorder the grid.
>
> That would work, except that the grid is a child grid of a parent
> record. The parent is a purchase order. The child is items on the
> purchase order. To get the right child items, the order of the child
> table needs to be set to ponumber. But to get the record order
> correct, the index has to be set to lineorder. So I'm rather confused
> as to how this would be done, if it can be done.
>
> Any help would be appreciated.
>
> Kevin Clark
> Seton Home Study School



Re: Order of records in a grid by Dave

Dave
Wed Nov 01 20:10:10 CST 2006

Kevin,

I think if you define the index of the child table as
ponumber+lineorder, assuming they both are character fields, you'll get
the results you want. All records in the child grid have the same
ponumber, right?

Dave Tiffany

KevClark64@hotmail.com wrote:
> I want to allow users to set the order of records in a grid. I realize
> that grid order is based upon the underlying records, so I have a
> lineorder field that theoretically could set the order of the records.
> Changing that field should automatically reorder the grid.
>
> That would work, except that the grid is a child grid of a parent
> record. The parent is a purchase order. The child is items on the
> purchase order. To get the right child items, the order of the child
> table needs to be set to ponumber. But to get the record order
> correct, the index has to be set to lineorder. So I'm rather confused
> as to how this would be done, if it can be done.
>
> Any help would be appreciated.
>
> Kevin Clark
> Seton Home Study School
>

Re: Order of records in a grid by KevClark64

KevClark64
Fri Nov 03 10:11:59 CST 2006

That did the trick. Thanks for the help.

Kevin Clark