PDA

View Full Version : Refresh Custom List after Delete and Insert


ABC123

dantum
07-02-2013, 12:34 PM
Hi,

Looking for an elegant way to refresh Custom List after insert and update into SQL table.

I have UX component with List and and controls for editing records on the same UX component. After Update it shows the changes just fine via server side AfterDialogValidate event. But other two don't seem to be as smooth.

Many Thanks

Dan

Davidk
07-06-2013, 11:12 PM
Hey Dan,

Just want to make sure I understand. You have a List Control on a UX component. Is it just a simple List control... or a List control containing a Custom Control?

Davidk
07-06-2013, 11:53 PM
I find that Update and Insert work just fine... no other code required other than that shown in the video UXL_V12--30. However, Delete needs a little more coaxing. I put this refresh code into the Client-side Event afterDeleteParentRecord.


{dialog.object}.refreshListData('list1');

Or... better... if your Delete button came from the Defined Controls, get into it's onClick event. You'll find code here but we're going to replace it. Click on the radio button Action Javascript. This will erase the code and let you add a New Action, the Delete Record action. In this action you can use the option to refresh controls.

dantum
07-09-2013, 08:07 AM
Thank you David.

dantum
07-09-2013, 10:14 AM
Another thing I just noticed.

Following a Video " List Control - Populating Data Bound UX Component controls when the selection in the List is changed. " It all seems to work except when list is filtered to an Argument Value. When Argument value is present in the list
for example : ID = :PARENT

adding new record does not automatically add it to the bottom of the list. Even though I can refresh the list after add, it makes for a jumpy list view when that happens. This might be a bug or something else needs to be done to List. I've explored some of the List Events but nothing worth mentioning yet.