I’m trying to default the txtECO text box of the Part revision checkout form to a set value.
My on load code for the form is:
private void PartRevCheckoutEntryForm_Load(object sender, EventArgs args)
// Add Event Handler Code
etbECO = (EpiTextBox)csm.GetNativeControlReference("18ec4816-e90b-4c3d-8c70-aa4669204145");
etbECO.Text = "BEMIS";
The Message box shows the Text value changed but when the form actually loads it is blank. I’ve run a trace and can’t see any methods being called…
Once I can do this, I would like to click the “OK” button automatically as well (that’s going to be my next problem …)
What I would actually like to do is have the process “Check out revision”, enter the ECO, click OK and then open the Engineering workbench all in one go. Is that possible?
That control is most likely bound to a data source. So even if you set it during Form_Load, it will get overwritten with the value from the DB, or some initial value (probably blank) upon a new temp record being created.
That makes sense. Is there a way of populating the text box after load?
Customizations aren’t my specialty. But maybe some other event like before/after adapter, or row change
But if I recall correctly, one shouldn’t change the values of bound controls, but rather change the underlying dataset.
[Puts up the @josecgomez bat signal ]
Thanks. How does one do that?
Follow the link above and look for the solution.
The solution shows the code for updating the dataview, but not how (or when) to call that code. I assume it wouldn’t work in the FormLoad, as I dont think the dataview is setup just yet.
(Asking for a friend. )
I normally use EpiViewNotification for this kind of thing. That’s when the data stuff is happening and it’s the logical place to do what you need to that data.
The thread linked to is more about doing things while the user is interacting, though, so there’s a lot about field events in there, which also works for a different set of use cases.
True. I just searched for DataView and Jose and this was one of the first results. Inspired by Brandon’s post on how to get help on this list, I wanted to show that searching the forum can be quicker and more educational than just asking for solutions.
So are you typing in the Part Number and the Rev Number?
And I am understanding you just want to default the Eco Group? Also how would you hit the button automatically ? When you need to specify a part and rev number?