paging

GridView sorting doesn't work when I Enable Caching in Custome Paging and sorting

Hi , I have a GridView that use a stored procedure for custom paging and sorting . It's OK and works fine (Both paging and sorting) , But the problem is when i Enable Caching in ObjectDataSource like : EnableCaching="True" It properly cache every page that the user visit , But at this case when the user want to sort it raise an e...

Does LinqDataSource perform Server-Side paging by default?

The title says it all. I've seen hints around the net that this is the case, but I can't find any official documentation to this effect. I want to be sure I have my facts straight before I utilize the LinqDataSource. Thanks guys. ...

ROW_NUMBER() and nhibernate - finding an item's page

given a query in the form of an ICriteria object, I would like to use NHibernate (by means of a projection?) to find an element's order, in a manner equivalent to using SELECT ROW_NUMBER() OVER (...) to find a specific item's index in the query. (I need this for a "jump to page" functionality in paging) any suggestions? NOTE: I don't...

Linq to SQL provides different results when using TOP and Between

Hi, I'm using Linq to Sql (in fact it's Dynamic Linq to SQL that allows you to pass strings at runtime for where clauses, orderby etc.) But I'm getting some different results and it seems to be based on whether the underlying T-SQL is using the TOP keyword or using BETWEEN. I've tried to the break the problem down into a small example,...

Get the total number of records when doing pagination

To get a page from a database I have to execute something like this: var cs = ( from x in base.EntityDataContext.Corporates select x ).Skip( 10 ).Take( 10 ); This will skip the first 10 rows and will select the next 10. How can I know how many rows would result because of the query without pagination? I do not want to run another ...

iPhone - Calendar Like Paging on Table View Header

Does anyone know a good example for Paging the views using dates... Calendar Like Paging on the Table View Header? I know it can be done a lot of time management, financial management apps have it. I just need to go on a right direction before cooking something of my own. Thanks. ...

products and configurable_products in postgresql

Hi I have a Product table and a ConfigurableProduct table. If there are several variations of the same product like a shirt in different colors I create a ConfigurableProduct. When a user is looking at the catalog he should see a list of products unless there is a ConfigurableProduct, then he should see it with a select box for each va...

Paging, sorting, editing with LINQ Data Source

Right, ok, I have followed Scott Gu's example in his part 9, etc, etc blog and despite my best efforts to achieve 'automatic sorting, paging and editing, I cannot get the so and so to work. Is automatic sorting, paging and editing possible with the following set up? <asp:TextBox ID="tbxHowMany" runat="server"></asp:TextBox> <asp:R...

Transform LINQ IQueryable into a paged IQueryable using LINQ to NHibernate

Hi! I wanna do something like that public IQueryable GetPaged<TSource>(IQueryable<TSource> query, int startIndex, int pageSize) { return GetSession() .Linq<TSource>() .UseQuery(query) .Take(pageSize) .Skip(startIndex); } So you can put any IQuerable statement and "it become...

Is there a common design pattern for making a collection class page-able?

I've run across this design issue a number of times and was wondering if there is a common OOP design pattern that addresses it. Design Issue: I need to implement a class that represents a collection of objects that can get quite large. For performance reasons, the presentation layer will present the data in individual pages requesting...

Getting index of a row in a list

Hi, I have a paging method that uses the criteria API's SetMaxResults and SetFirstResult. Functionally, it works fine. What I'd like to do now is provide another method that retrieves the index of a given item within the set of all items, thus allowing me to calculate what page that item is in. I am able to calculate the index correct...

Entity Framework + stored procedure with paging

I am using Entity Framework now and using a stored procedure to populate my entity. Where there is no problem with populating my entity, but when i trying to bind the result to a gridview control with "Enable Paging" set to true, it gives an error saying "The data source does not support server-side data paging." I am using stored proc...

Error With DataPager and DataGrid/DataForm

Does anyone know what this error means? I get it when I try to page past page 80 if I have more than 161 pages in a DataGrid. System.InvalidOperationException: Cannot Change currency when an item has validation errors or its being edited and AutoCommit is false ...

Gridview paging

Hi all, I am displaying the sales table data in grid view with field like itemid, itemname, quantity, cost. I have set paging, each page can hold 10 rows. In each page i want to calculate total quantity and TotalCost in two text box. When i am running the application by default in page1, in txtquanty and txtTotal cost should display the ...

Virtual Scrolling / Paging

Hi all, I was wondering if anyone know of examples out there on how to page a List of data via scrolling. (i.e. like yahoo mail) Thanks ...

DataPager and Datagrid, How to move to the page of current selecteditem

In a Silverlight project I have a view with a list (DataGrid) of cases. The list is paged with DataPager. My source collection is wrapped in an PagedCollectionView. When an item is created it is added to the list and set as selecteditem in the DataGrid, depending on the list sorting, this could be on another page the the current active ...

malloc behaves differently on different machines

Hi, I see totally different behavior when running a piece of program that tries to exceed RSS on different machines. The code is something like: ... char** s = (char**)malloc(10000*sizeof(char*)); for (i = 0; i < 10000; i++){ s[i] = (char*)malloc(1000*1000*sizeof(char)); if (s[i] == NULL) { printf("cannot allocate me...

ASP.NET GridView 'Page Not Found' on PostBack

I have a GridView that (in one particular instance) would contain about 5000 rows, each row containing a DropDownList with about 5000 items. Naturally, this takes forever to load and throws and OutOfMemory exception on my box. No big deal, I thought. I'll just enable paging. Well, that works fine (for the same gridview) when its bound...

How can I page my LINQ to SQL result set?

Remembering MySQL could use the instruction "limit" to indicate where I was starting my result set and how many wanted to have included. Select * FROM Users Limit [start], [Length] How can I do this in LINQ to SQL? ...

ASP.NET MVC Paging for a search form

I've read several different posts on paging w/ in MVC but none describe a scenario where I have something like a search form and then want to display the results of the search criteria (with paging) beneath the form once the user clicks submit. My problem is that, the paging solution I'm using will create <a href="..."> links that will ...