Page 1 of 1

Is a plugin possible to have grids become sortable?

PostPosted: Thu May 12, 2022 4:03 pm
by DannyC
There's a few grids in various screens throughout Jiwa which can't be sorted.

One specifically brought to my attention is Creditor Purchases.
Another is EFT/Chq Payments.

But other grids can be sorted such as Shipment Lines.

Is it possible that a plugin could resolve that or would it need to be built into the Jiwa code?

Re: Is a plugin possible to have grids become sortable?

PostPosted: Thu May 12, 2022 5:08 pm
by Mike.Sheen
DannyC wrote:There's a few grids in various screens throughout Jiwa which can't be sorted.

One specifically brought to my attention is Creditor Purchases.
Another is EFT/Chq Payments.

But other grids can be sorted such as Shipment Lines.

Is it possible that a plugin could resolve that or would it need to be built into the Jiwa code?


If you sort that Creditor Purchases grid, things will be really confusing if there are dispersals. Dispersals allow you to have one transaction dispersed to multiple GL accounts, and they are shown as being below the transaction they are dispersing - so any sort would have to be mindful of that.

That's we we disabled it. You can enable it in code, but I think you will regret doing so.

Re: Is a plugin possible to have grids become sortable?  Topic is solved

PostPosted: Sat May 14, 2022 3:43 pm
by SBarnes
Hi Danny,

Whilst I STRONGLY ADVISE you heed Mike's warning on the screen mentioned, you did mention other screens, so attached is a plugin that I did it for Batch Printing to, there is a lot of commented out code as I had to bring it up to version 7.2.1 as the form had changed as had the backing objects which will show you what to do.

But it is not just as simple as making the grid sortable quite often the form is going to assume that grid is in the same order as the collection that is backing it as this example demonstrates the collection has to be reordered so the form behaves.