Disable release All tickbox

Hi everyone,

I need to be able to disable the Release All tickbox on the order job wizard. The problem is that it only becomes enabled after the Schedule All tickbox is ticked, so simply setting enabled to false on the form customisation did not work. Anyone have any idea how to do this please?

Best regards

Adrian.

Maybe try a BPM that when the Schedule All is checked, the BPM will then uncheck the Release All box and uncheck the Schedule All box?

You can use custom code to accomplish this. Something like below could be used. This code could use some optimization, if you do it this way.

// **************************************************
// Custom code for OrderJobWizForm
// Created: 11/6/2017 11:06:29 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public class Script
{
	// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
	// Begin Wizard Added Module Level Variables **

	// End Wizard Added Module Level Variables **

	// Add Custom Module Level Variables Here **
	Ice.Lib.Framework.EpiUltraGrid ug;
	public void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls
		EpiUltraGrid ug = (Ice.Lib.Framework.EpiUltraGrid)csm.GetNativeControlReference("c73444a5-dfea-48bf-a553-2c2fcd01474c");
		ug.AfterCellActivate += new System.EventHandler(ug_AfterCellActivate);
		// End Wizard Added Custom Method Calls
	}

	private void ug_AfterCellActivate(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		ug.ActiveRow.Cells["ReleaseChkBox"].Column.CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
	}

	public void DestroyCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
	}
}

Something like this would handle the global Release All and the grid level Release All

// **************************************************
// Custom code for OrderJobWizForm
// Created: 11/6/2017 11:06:29 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public class Script
{
	// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
	// Begin Wizard Added Module Level Variables **

	// End Wizard Added Module Level Variables **

	// Add Custom Module Level Variables Here **
	Ice.Lib.Framework.EpiUltraGrid ug;
	Ice.Lib.Framework.EpiCheckBox chkScheduleAll;
	Ice.Lib.Framework.EpiCheckBox chkRelease;
	public void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls
		EpiUltraGrid ug = (Ice.Lib.Framework.EpiUltraGrid)csm.GetNativeControlReference("c73444a5-dfea-48bf-a553-2c2fcd01474c");
		ug.AfterCellActivate += new System.EventHandler(ug_AfterCellActivate);
		chkScheduleAll.Click += new System.EventHandler(chkScheduleAll_Click);
		
		// End Wizard Added Custom Method Calls
	}

	private void ug_AfterCellActivate(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		ug.ActiveRow.Cells["ReleaseChkBox"].Column.CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
	}
	
	private void chkScheduleAll_Click(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		EpiCheckBox chkRelease = (Ice.Lib.Framework.EpiCheckBox)csm.GetNativeControlReference("a8808397-570b-48e8-bb7b-6225d9270dfe");
		chkRelease.Enabled = false;
	}

	public void DestroyCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
	}
}

Thankyou Dan, that looks like the kind of thing I need. I will have a go at
implementing it this week. Thanks again.

Regards

Adrian.