Difference between update and updateWindow ?

Hello. Can anyone tell me what the difference is between the update() and updateWindow() methods? I am using a listbox to display messages on a form, and I want it to update while it carries out a huge method. At the moment, I am using listbox.updateWindow() to achieve this. Should I be using listbox.update() or does it not matter? Thanks, Simon Batchelder

Hi all. According to my supplier, update() is a generic method used with everything in Axapta. UpdateWindow() is specific to certain controls, mainly the ones used for display. From this, it is my understanding that I should use updateWindow() for anything that displays data to the screen, and use update on data objects (tables, grids, views and maps). I would be interested to hear comments on this analysis. Thanks, Simon Batchelder

Hi, I argee. updateWindow() when you want to update some kind of display, fields in a form etc. And update() when you want to update the record in current table(update in database). /Peter Karlsson

But you can also use the ‘refresh’ function to update the changes.

Hi. Could you post more information about the refresh function? Also, when programming a form you can you element.redraw(); to carry out screen refreshes. I think this method would be slower than updateWindow(), as it probably redraws the whole screen, not just part of it. Thoughts and comments? Thanks, Simon Batchelder

Hi Ken,

quote:


Originally posted by Vagabond
But you can also use the ‘refresh’ function to update the changes.


Using refresh() function, only datasource can be refreshed. To update the change update() function should be used. Thanks Krishnendu