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

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Is a plugin possible to have grids become sortable?

Postby DannyC » Thu May 12, 2022 4:03 pm

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?
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

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

Postby Mike.Sheen » Thu May 12, 2022 5:08 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

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

Postby SBarnes » Sat May 14, 2022 3:43 pm

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.
Attachments
Plugin Attkey Sort Batch Printing Grid.xml
(38.97 KiB) Downloaded 280 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 6 guests