initialSort not working in showFormInDialog

I have a form that uses a table view with an initialSort specified, and it works (ie. it sorts).

I put this form in a tabpanel on a second form with an initialSort specified (on both the second form and tab panel), and it works.

I then put the second form in a (pop-up) dialog using showFormInDialog, and it does not sort. :cry:

Since there is no ‘initialSort’ property for the showFormInDialog, how do I get the form to display as sorted in the dialog? The dialog is in modal mode; I tried changing it to non-modal mode, but it didn’t make any difference.

Thanks!

I often hook onShow event to sort my foundset when initialSort does not work.

Regards

Thanks, Birgit…that worked!

initialsort is bound to the form.

If you say it’s not triggered when displaying the form in a dialog, but it is in other cases, there might be an issue in Servoy with regards to initialsort and dialogs. Could you file a case in our support system with a sample solution?

regards,

Paul

Paul,

I have had similar issues with initialSort and had to resort to the OnShow as well per Birgit’s suggestion. Sorry - I don’t have a case in front of me or remember the specifics but just to throw my hat in the ring as well on this one. I think it was something to do with how the form was sitting in a tab container and what controllers were acting as the “parent” (but my memory is a tad vague on the environment at the time so take this comment with a grain of salt). One of those things in development where “this doesn’t work so I’ll try this and away it went so I didn’t bother chasing it”. In my case, the tab container had “self-joins” (ie - not enough room for my parent table data to sit on one form) and the rest are conventional parent-child forms within the same tab container.

Michael

Offcourse, sorting also depends on the foundset: if you got two forms using the same foundset, but have different initialsort settings, the first one loaded will determine how the foundset is sorted.

When you are working with related foundsets, the initial sorting set on the form is not applied, because it’s a related foundset.

The ability to specify the initial sort on a relation si allready on our radar though.

Paul

Paul,

Fair enough … your comments are interesting and it may be helpful to add some of these sorts of thoughts to the documentation (I figured most of this out (eventually) but it took some “wrestling around”) as well as whatever technical adjustments engineering has planned for future releases.

Best,

Michael