This is a child of topicRead only on grid.
The wizard created the code but it blows up. Previously I added a combo-box to the same ultragrid “grdPCO” and use the same to catch users deleting lines via the DEL keyboard key. Those all worked until now.
VS says it’s Null Reference Exceptions but Epicor shows the two errors below. Been going down a few roads on troubleshooting but so far coming up blank. The code it’s bombing on is:
private void SetExtendedProperties()
{
EpiDataView edvUD28View = ((EpiDataView)(this.oTrans.EpiDataViews["pcoGrid"]));
if (edvUD28View.dataView.Table.Columns.Contains("CheckBox01"))
{
edvUD28View.dataView.Table.Columns["CheckBox01"].ExtendedProperties["ReadOnly"] = true; //PCO is Submitted
}
}
private void SalesOrderForm_Load(object sender, EventArgs args)
{
pcoGrid.DisplayLayout.Bands[0].Columns["ShortChar01"].ValueList = cmbPCOTypes;
pcoGrid.DisplayLayout.Bands[0].Columns["ShortChar01"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
cmbPCOTypes.ForceRefreshList();
this.pcoGrid.KeyActionMappings.Add(
new GridKeyActionMapping(
// the key code
Keys.Delete,
// the action to take
0, //UltraGridAction.FirstRowInGrid,
// disallowed state
0,
// required state (none)
UltraGridState.InEdit,
// disallowed special keys
0, //(none) //Infragistics.Win.SpecialKeys.Alt,
// required special keys (none)
0 ) );
}
Application Error
Exception caught in: mscorlib
Error Detail
============
Message: Exception has been thrown by the target of an invocation.
Inner Exception Message: Object reference not set to an instance of an object.
Program: CommonLanguageRuntimeLibrary
Method: InvokeMethod
Client Stack Trace
==================
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeScriptMethod(MethodInfo scriptMethod, Object[] parameters)
at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeCustomFormLoadIfExists(String methodName, Object sender, EventArgs e)
at Ice.Lib.Customization.CustomScriptManager.<>c__DisplayClass103_0.<OnCustomCodeFormLoad>b__0()
at Ice.Lib.Customization.CustomScriptManager.TryActionShowExceptionBoxOrLogVerificationErrorIfException(Action action, String exceptionBoxTitle)
Inner Exception
===============
Object reference not set to an instance of an object.
at Script.SalesOrderForm_Load(Object sender, EventArgs args) in c:\ProgramData\Epicor\azeislaapp02vm.elkay.elkaymfgco.com-443\3.2.200.0\ISI\CustomDLLs\App.SalesOrderEntry.SalesOrderForm.EP.ISI.Customization.OrderEntryPCO.CustomCode.16.cs:line 5660
Application Error
Exception caught in: Ice.Lib.EpiClientLib
Error Detail
============
Message: Control 'grdPCO' of type EpiUltraGrid has an invalid binding to view UD28View.
Program: Ice.Lib.EpiClientLib.dll
Method: EventSetup
Client Stack Trace
==================
at Ice.Lib.Framework.EpiUltraGrid.EventSetup()
at Ice.Lib.Framework.EpiUltraGrid.set_EpiTransaction(IEpiTransaction value)
at Ice.Lib.Framework.EpiUIUtils.BindNConfigureControls()
```