I’ve created a simple customization for Customer Shipment entry which…
a) Creates an EpiDataView from the UD04 adapter. UD04 contains the PackID key in a shortchar field.
b) When a PackID is entered in Customer Shipment Entry (Summary Sheet), The UD04Adapter search updates the dataset with matching UD records. This search is triggered from oTrans.AfterAdapterMethod (GetByID for a PackID).
c) On a sheet I’ve created (in Cust Ship Entry), a bound EpiUltraGrid SHOULD display the matching rows, but doesn’t - until I press the refresh button.
I’d like to ensure the grid is displaying the found records even before the user clicks onto that sheet. The data is definitely contained in the adapter’s dataset and definitely accessible by the grid control - as soon as I press refresh, the data appears.
I’ve added a grd.Refresh() at the end of the GetByID (AfterAdapterMethod) method, but, even though it fires, and the dataset is updated, nothing is displayed in the grid until I press refresh.
I would appreciate any ideas as I’ve run out of things to try.
Did you use the Customization Wizard > Add UD Table as Child to link to your UD40 table? If not, please do. This will solve your issue.
Also, since you are using a grid, the Events tab has special things for your custom grid so it behaves more like the rest of the application.
Wow. Thanks @Jason_Woods. I created a brand new ‘Test’ customization and used the wizard, as you suggested. It works perfectly.
My initial approach started with the UD table added by wizard, but in the interest of ‘cleaning up’ the code, I deleted some(apparently necessary) ‘stuff’, and lost the functionality in my post.
I’ll compare this new test customization against my full customization to figure out how to re-insert the lost functionality.
And, you’re definitely on point regarding the events available for the grid. There’s quite a lot there!
Thanks again!
… Just a quick addition, for anyone that may stumble onto this topic…
It is the ParentView to ChildView relationship that is required in order for Controls bound to the ChildView to update immediately.
I created a new customization (“Test”) using the wizard in order to add my UD table, as Jason suggests. The wizard created the relationship between the views and added other functionality (AddNew, Delete, etc.)
Once the wizard provided a working customization, I could then tweak to remove extraneous/unwanted methods. However, once I remove anything that impacts the ParentView/ChildView relationship, Controls bound to the ChildView (the UD table) would no longer update immediately, regardless of Bindings and Notify() and Refresh() methods. Only after I re-established the Parent/Child relationship, as the Wizard did, did the immediate updates return.