0

I have a custom webpart control on a page which, upon page load, deletes the items from a list (displayed on the same page as the custom webpart).

After deleting the items, the code also populates it again.

Also, users can use dropdowns etc and click a submit button to filter data which populates the list.

Upon initial page load, the results are displayed correctly, for example 30 of 50 items displayed (you can use OOTB paging controls of the list to see the last 20 items).

However, when I click submit, instead of a re-populated list appearing, items appear to be added onto the list on top of existing items. Its bizarre!

Here is what happens:

1 - Page loads, list has 50 items, displays 30 of them on current view.

2 - I page to the next (last) page of items.

3 - I click submit (the page deletes all items from list and should have 50 items again)

4 - List now has 80 items! (i know this after paging).

I have no idea what is going on? Is this something to do with the timing of certain events?

thanks,

KS

1
  • Yes, that is being used. It's not a code issue, as when debugging, the list count shows the correct number of items.
    – Perplexed
    Sep 7 '12 at 19:43
0

Are you clearing your list control when you do a post back? The control will save state during the refresh.

Also which event are are you populating the data in?

Regards Simon

1
  • I have passed this on to someone else - so not my head ache any more! I will accept your answer anyway. thanks.
    – Perplexed
    Oct 29 '12 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.