Add a lookup button to Notes grid in P/O and S/O  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Add a lookup button to Notes grid in P/O and S/O

Postby pricerc » Wed Apr 17, 2019 9:09 pm

So we now have a (potentially) many-to-many relationship between sales orders and purchase orders.

In practice, one sales order may have multiple purchase orders, or one purchase order may have multiple sales orders.

We're happily storing these as text in a Notes field on the respective screens, and that's working fine, and I can add notes either programmatically, or by just typing the corresponding OrderNo in the notes field.

So the question is: can I add a 'lookup' button column to the notes grid? It's not desperately needed, but it would be kinda cool if when a user picks a note type of "Related Purchase Order", I could enable a lookup button that fires off a Purchase Order Search.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Add a lookup button to Notes grid in P/O and S/O  Topic is solved

Postby SBarnes » Thu Apr 18, 2019 9:31 am

Hi Ryan

If you know the name of the grid the following is an example of how to do it

Code: Select all
jgLines.AddColumn("PartNoLU", new  JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaLookupButtonCellType(Manager) {Text = ""}, "", 15, false, true, false,false);


you then also need to do the button clicked event for the grid which looks like this

Code: Select all
private void jgLines_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
      {
         //System.Diagnostics.Debugger.Launch();
         


         if(e.Column == PartNoLUColumn)
         {
            string result =  SearchInventory(this);
             if(result != "")
            {
                                  

            }
         }
         
      }



and you will need to hook this up somewhere.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Add a lookup button to Notes grid in P/O and S/O

Postby Knarr » Thu May 02, 2019 11:18 pm

What's the best place to hook something like this up, Stuart?
Knarr
I'm new here
I'm new here
 
Posts: 1
Joined: Wed May 01, 2019 8:10 pm


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron