Welcome Guest Search | Active Topics | Sign In | Register

getItemCount and deleteItem problem Options
Arthur
Posted: Thursday, February 11, 2010 11:15:48 PM
Rank: Member
Groups: Member

Joined: 2/9/2010
Posts: 21
Hi,
There are 2 buttons.
Button1 use client API:addItem to add a new item to grid.
Button2 use client API:deleteItem to delete all items in grid.

1.Click button1 a few times first.
2.When button2 be clicked,all items will be delete.
3.But use getItemCount to check how many items in grid,it will not show zero,still show items number before button2 clicked.
4.Click button1 a few times more.
5.Check getItemCount value will show total number all button1 be cliked times.

Is it a bug?
eo_support
Posted: Friday, February 12, 2010 8:53:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

This behavior is by design. The deleted items are only "marked" as deleted on the client side so that when you go back to the server side, you will still know what has been deleted. Otherwise you will only know something like "the fifth row has been deleted", but you don't know what the fifth row was, which can cause a lot of difficulties for your server side code to update the db accordingly.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.