I am using some code on a form customization to add packs to a masterpack and when it finishes all the packs are added as expected, but none of the address fields are displaying the address or the ship to…
If I close the master pack and re-open it… the address loads into the appropriate textboxes.
Getting flustered at this point and don’t want to do something hacky, like close the form and re-open to see the changes.
I’ve tried this.oTrans.Refresh(), Update(), NotifyAll(), validatekeyfield(mytextbox), etc.
If anyone has any last tips they would be much appreciated.
Is that the part that’s supposed to refresh the screen? (I’m still new at this)
Have you tried a GetByID at the end - to pull from the DB without having to refresh the screen? or is that crazy?
I started doing some more debugging cause I wasn’t getting what I wanted trying to do everything the server trace was giving me so I did an after adapter method and popped up the adapter methods that were being called… That brought me to search ResetList() on here which got me to a post by none other than @Chris_ConnOrder Release Method - #2 by Chris_Conn
I added that before my oTrans.Update() call like this and it worked! My form now displays the changes.
Maybe @Chris_Conn can explain what it is that ResetList is doing and what the reset list mode is for, or anyone else on here other than me… cause I have no clue… but it works… and I hate saying that and not knowing.
Just in case I ever go into biz for myself I gotta keep my cred up
This code performs different tasks based on the value of mode. If mode is not set to ResetListMode.AddRow, it will find a row in the masterpackList table with a matching value for the “RowIdent” column. Once found, it stores the DataRow in listRow and breaks out of the loop.
If no rows are found, then listRow remains as null.
Next, it attempts to execute different operations based on the value of mode.
If mode is set to ResetListMode.AddRow, it will create a new DataRow with values from resetRow and store it in listRow. It then adds this newly created row to the table.
If mode is set to ResetListMode.DeleteRow, it will remove the listRow from the table.
If mode is set to ResetListMode.UpdateRow, it will update the values of listRow with values from resetRow. It also handles date time data type by checking its value and assigning it to the corresponding column in the row.