Created JiwaGrid Column Width Issue  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Created JiwaGrid Column Width Issue

Postby neil.interactit » Thu Sep 14, 2023 12:58 pm

Hi guys,

I am stuck on something that is probably easily fixed but is eluding me.

I am creating a new JiwaGrid which is placed on 2 forms - Purchasing / Order Entry and Purchasing / Landed Cost / Shipments.

The same grid works fine on the Order Entry form but not on the Shipments form ... the columns are all roughly half the correct width.

I have attached a cut down sample.

Could you point out the error of my ways?

Cheers,
Neil
Attachments
Plugin JiwaGrid Column Width Issue.xml
(33 KiB) Downloaded 131 times
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Created JiwaGrid Column Width Issue

Postby SBarnes » Thu Sep 14, 2023 6:33 pm

Hi Neil,

Whilst I can't tell you how to fix the problem I can tell you what is causing the problem, if you undock the shipment form and then close it an open it without it being maximized you will see that the columns do in fact fill what the grid is initially given in terms of width, so the issue I believe relates to the fact that the grid is sitting in the Table Layout control and for some reason is not refreshing on the form resize.

This image demonstrates what I mean.
shipment.jpg


Mike or Scott may be able to offer a way to overcome the issue.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Created JiwaGrid Column Width Issue  Topic is solved

Postby Mike.Sheen » Fri Sep 15, 2023 11:51 am

If you ever create a JiwaGrid control and add it to a form, you need to invoke the InitialiseGridControl() method or a bunch of things won't work right - including resizing.

Why it resized the grid columns on the PO form and not the LandedCost form is probably related to the order things occur in each of those forms - but just invoking InitialiseGridControl() will make it work everywhere.

You may have also noticed that you also didn't get a context menu appear when you right-clicked the column header of the grid on either form - that's another thing which InitialiseGridControl() does - it adds all the event handlers to handle interactions and stuff for you.

Attached is a revised version of your plugin, calling the InitialiseGridControl() method.
Attachments
Plugin JiwaGrid Column Width Issue - V2.xml
(33.95 KiB) Downloaded 135 times
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Created JiwaGrid Column Width Issue

Postby neil.interactit » Fri Sep 15, 2023 1:01 pm

Ah, perfect, thanks Mike.

I hadn't specifically noticed the lack of the context menu, but I had wired up a few drill downs which weren't working and was about to look into that.

Thanks again,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

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