Cashbook Lines Grid  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Cashbook Lines Grid

Postby SBarnes » Thu Mar 17, 2022 4:35 pm

How in the cashbook lines grid can I programmatically make the reference column be shown, regardless of the user's choice in managing the columns?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Cashbook Lines Grid  Topic is solved

Postby nsbandara » Sat Mar 19, 2022 12:59 am

Hi,

You can set the visibility of the column as below and Jiwa should display column regardless of column customizations.

Code: Select all
public class FormPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaFormPlugin
{

    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void SetupBeforeHandlers(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
    }

    public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
      if(JiwaForm is JiwaFinancials.Jiwa.JiwaCashBookUI.frmCashBookReceipts)
      {
         JiwaFinancials.Jiwa.JiwaCashBookUI.frmCashBookReceipts frmReceipts = JiwaForm as JiwaFinancials.Jiwa.JiwaCashBookUI.frmCashBookReceipts;
         frmReceipts.grdLines.ActiveSheet.Columns["Reference"].Visible = true;
      }
    }
}
User avatar
nsbandara
Occasional Contributor
Occasional Contributor
 
Posts: 43
Joined: Tue Jul 16, 2013 5:02 pm
Location: Sri Lanka
Topics Solved: 11


Return to Technical and or Programming

Who is online

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