Print Page | Close Window

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

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2759
Printed Date: 30-Jul-2026 at 2:55am


Topic: The time allotted to this operation may have been a portion of a longer timeout
Posted By: new user
Subject: The time allotted to this operation may have been a portion of a longer timeout
Date 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.




Replies:
Posted By: sbelini
Date 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 http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-paged-collection - 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 http://drc.ideablade.com/xwiki/bin/view/Documentation/understand-timeouts#HQuery - DRC as well.
 
Regards,
Silvio.



Print Page | Close Window