Problem with new ListView

S

shapper

Hello,

I created a ListView with a DataPager associated with it.

The ListView renders as a table but I suppose it is irrelevant for the
problem I describe here.

I moved the ListView to a page, let's say 10. Then I deleted all
elements of this page.

The normal behavior would be:

1. When the last element of a page is deleted move to previous page.

2. When the last element of the first page is deleted show
EmptyDataTemplate.

The record deleting is handled in ListView ItemDeleting event.

What happens is when the last record of a page is deleted the ListView
disappears.

If I refresh the page I get the following error:

Sequence contains no elements

How to solve this?

Thanks,

Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top