Page 1 of 1

Cashbook Lines Grid

PostPosted: Thu Mar 17, 2022 4:35 pm
by SBarnes
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?

Re: Cashbook Lines Grid  Topic is solved

PostPosted: Sat Mar 19, 2022 12:59 am
by nsbandara
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;
      }
    }
}