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?
|
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!
|