I'm using VB.Net to update line item site id's to match the header default.
Example:
SOPLineWorkTable.Change()
SOPLineWorkTable.LocationCode.Value = GPAddIn.SalesTransactionEntry.LocationCode.Value
SOPLineWorkTable.Save()
This all works fine except that when you look at the line item in the GP scrolling window it still displays the old value. If you click into the line site id field it automatically refreshes and displays the new value I updated in the global table buffer.
Does anyone have a .Net code example of repainting/refreshing the particular scrolling window line after making changes to the underlying global table buffer for that line?
Or, does anyone have an example of refreshing/repainting all the scrolling window lines to display the current table values?
Thank you.
Thanks Derek. I had previously gone through the developers guide and found nothing in this regard. I think scrolling windows are severely limited in their exposure to dot net. However I did come up with a working solution as clunky as it may be. For anyone interested, read on.
I found no way to target a specific line even with trying the local forms table buffer...meaning I could not specify any particular line to refresh. I even went from the first through to the last line hoping that the window would reflect which forms table buffer I was currently on but that proved unrelated as well. What I ended up doing is after my changes were made to the line locations via the global table buffer, I set the focus on the window to the location code in the linescroll section. This seems to always put it on the new line at the bottom of the list...something our users would not like should they choose to expand the list so I needed to ensure that wasn't the case permanently. I then open the line item expansion, click the prev button, collapse the line item expansion and set the focus to the customer PO number so that if our users click the line expansion it will open on the first line instead of the last. It only occurs once for all items and is quick and almost unnoticeable.
GPAddIn.SalesTransactionEntry.LineScroll.LocationCode.Focus()
GPAddIn.SalesTransactionEntry.ShowDetailButton.Focus()
GPAddIn.SalesTransactionEntry.ShowDetailButton.RunValidate()
GPAddIn.SalesTransactionEntry.LineScroll.ScrollPrevButtonP.Focus()
GPAddIn.SalesTransactionEntry.LineScroll.ScrollPrevButtonP.RunValidate()
GPAddIn.SalesTransactionEntry.ShowSummaryButton.Focus()
GPAddIn.SalesTransactionEntry.ShowSummaryButton.RunValidate()
GPAddIn.SalesTransactionEntry.CustomerPoNumber.Focus()
I know our VBADevelopersGuide has information on 'Programming Grids' i.e. scrolling windows, as to events, properties, methods that can be used with them. You can start there if you haven't already.
I'm sure some of our Developers here in the Community will probably have more in-depth information as well.
Thanks
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156