New Posts New Posts RSS Feed: The time allotted to this operation may have been a portion of a longer timeout
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

The time allotted to this operation may have been a portion of a longer timeout

 Post Reply Post Reply
Author
new user View Drop Down
Newbie
Newbie


Joined: 18-May-2011
Posts: 7
Post Options Post Options   Quote new user Quote  Post ReplyReply Direct Link To This Post Topic: The time allotted to this operation may have been a portion of a longer timeout
    Posted: 13-Jun-2011 at 6:24am
hello,

I have a RadGridView in my Xaml page witch conatins 7000 records. I have used RaddataPager with 10 records in each page. But in my ViewModel when I tried to retrieve all the data from database it is showing the following error.

The HTTP request to 'http://machine/EntityServer.svc/sl' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.

   <telerik:RadDataPager  x:Name="RadDataPager1"   PageSize="50"  Source="{Binding EmployeeDataSource, ElementName=RadGridView1}"
              DisplayMode="FirstLastPreviousNextNumeric"   IsTotalItemCountFixed="True" />
                <telerik:RadGridView x:Name="RadGridView1"  ItemsSource="{Binding ItemsSourcePagedCollection, Mode=TwoWay}" AutoGenerateColumns="True"  >
                </telerik:RadGridView>


 public ViewModel()
        {
          
            EmployeeDataSource= new ObservableCollection<Employee>();
            ItemsSourcePagedCollection = new PagedCollectionView(EmployeeDataSource);
        
            var manager = new NorthwindIBEntities();
            EmployeeDataSource.Clear();
            var Query = mgr.Employees;
            Query.ExecuteAsync(op => op.Results.ForEach(EmployeeDataSource.Add));//getting error

        }


So how can I make use of paging in GridView and initially take only 10 records and when we select another page make an incremental call to database?

Thanks.

Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 13-Jun-2011 at 2:25pm
Hi new user,
 
PagedCollectionView (System.Windows.Data.PagedCollectionView) assumes the data is already loaded in cache.
 
EntityQueryPagedCollectionView (IdeaBlade.Windows.SL.EntityQueryPagedCollectionView) will actually support paging using asynchronous queries. You will find a sample using EqPCV in the DevForce Resource Center.
 
If you decide to still use PagedCollectionView, then you should increase the timeout intervals of the query's CommandTimeout and TransactionSettings. You will find detailed information about increasing timeout intervals in the DRC as well.
 
Regards,
Silvio.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down