NetTalk Central

Author Topic: Sort browse depending on parent  (Read 4444 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Sort browse depending on parent
« on: April 01, 2009, 03:34:35 AM »
Hi,
Any easy way to sort the browse depending on the parent?

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sort browse depending on parent
« Reply #1 on: April 01, 2009, 04:20:40 AM »
Parent or Caller?

If you have "child browses" then the parent is the one calling the children.

If you have a browse on a form then the Form is the parent, and the browse is the child.

In other words, to be a parent the parent is always visible as well as the child.

In your earlier thread you talked about a browse calling a form, and thus being the parent of the form. This is inaccurate. It's not the parent, it's the caller.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Sort browse depending on parent
« Reply #2 on: April 01, 2009, 04:24:35 AM »
Sory,

I have a browse on a form then the Form is the parent, and the browse is the child.

This browse is child of many forms and I need to sort it depending on the form (parent)

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sort browse depending on parent
« Reply #3 on: April 01, 2009, 04:56:06 AM »
you're best then adding some hand-code to the browse, just ater the sort order is set. You can use loc:parent to know which form you are on.

If you right-click, and choose Source, go to the GenerateBrowse routine. Just before the LOOP statement you should be able to see how the sort order is set.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Sort browse depending on parent
« Reply #4 on: April 01, 2009, 05:05:51 AM »
OK, and continuing with my other post.

If I have some browses, which updetes with the same form, how to know in the form woch browse is the caller?

Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sort browse depending on parent
« Reply #5 on: April 01, 2009, 08:55:46 PM »
Hi Alberto,

Set a session value in the GenerateBrowse routine of the browse, and read it in the Form where you need it.

Cheers
Bruce