I’ve already performed this step. To be a bit more precise, I’m specifically interested in the behavior of the “ckbTMBilling” control on the Sales Order Entry form (Erp.UI.App.SalesOrderEntry.SalesOrderForm).
Trace log show nothing going on behind the scene after clicking on that control, on and off, three consecutive times, for a total of 6 clicks.
There are no properties that I can isolate related to that control’s value (true/false), or its checked “state” (true/false):
I can access the data view:
edvOrderDtl = ((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"]));
DataRow edvOrderDtl_Row = edvOrderDtl.CurrentDataRow;
… and assign the value to a variable:
var varTMBilling = edvOrderDtl_Row["TMBilling"];
I can also address it from the Ice framework:
Ice.Lib.Framework.EpiCheckBox chk = (Ice.Lib.Framework.EpiCheckBox)ctrl;
… and try to modify its checked state:
chk.Checked = false;
The problem is that any attempt to modify, by custom C# code, the checked state of this control - the results never show up on the form.
I’ve tried “oTrans.Refresh” and “oTrans.Update” (in the case of modifying the data view), but this produces a lot of record state errors.
So – the question was more in general terms because I’m not looking to adjust data related to the state of the checkbox… I’m looking to control, from a data validation and work-flow process, if the checkbox should be checked, or not.
It’s more of this type of situation:
- User clicks on that checkbox
- Message box is presented to inquire if the user meant to place a check in the box
- User responds “yes”; conditional takes over and logs that confirmed answer, leaving the check in place – OR …
- User responds “no”; conditional takes over and clears the checkbox for them
It’s the last part in bold that I’m having trouble with.
Is there some magical trick to simply clear the checked state of a checkbox without getting into the data view and refreshing the form?