Anthony Hyams
Posts: 0
Joined: Tue Apr 01, 2014 10:54 am

refresh list after deleting an item

I have a list. There is a split button on the right. when I click this button it invokes a service that deletes the item from the database. This all works. However when I try to refresh the list on the delete item success using the following

Appery('mobilelist_1').listview("refresh");

Nothing happens. The item is deleted but list remains how it is. If I navigate away and back again then the list refreshes as I would expect.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

refresh list after deleting an item

Hi Anthony -

Where exactly you put this code?

Anthony Hyams
Posts: 0
Joined: Tue Apr 01, 2014 10:54 am

refresh list after deleting an item

there is a delete service that runs when the button is clicked. I run it as a javascript event on the success of the delete service

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

refresh list after deleting an item

Hi Anthony,

How do you delete a list item?

Paul Ladley
Posts: 0
Joined: Wed May 14, 2014 4:46 pm

refresh list after deleting an item

I had this problem. I solved it by calling the list service again on a success event after the deletion (or in my case addition).

I can't get the deletion to work though. I have tried labels on lists, but that makes them not clickable. What do you mean by split button - a checkbox? I have just put a label on a checkbox and they remain clickable, so might try that.

Paul Ladley
Posts: 0
Joined: Wed May 14, 2014 4:46 pm

refresh list after deleting an item

Sorry for spamming - I have just found the split button option. I am newbie - oops!

Mind you as soon as i drag a label or grid on to the split button it stops being clickable. No hover state, and the cursor doesn't change except for becoming a caret over the label text.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

refresh list after deleting an item

Hi Paul,

Let us know if you need any further help.

Paul Ladley
Posts: 0
Joined: Wed May 14, 2014 4:46 pm

refresh list after deleting an item

Yes I do, but maybe we should do it in my original post, so as not to hijack Anthony's post any further

https://getsatisfaction.com/apperyio/...

Anthony Hyams
Posts: 0
Joined: Tue Apr 01, 2014 10:54 am

refresh list after deleting an item

Paul, just to say - When I wanted to map several data items to a list I discovered the same issue. The trick was to build what I wanted on the list in javascript and then return it to the list

eg. return " Event:" + value.event_name + " Event starts

" + value.start_time + "

";

this worked for me

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

refresh list after deleting an item

Paul,

Let's continue there. Let us know if Anthony's solution helps.

Return to “Issues”