Custom paging works great, I have about 400,000 rows, so I just return 100 from sql server when I change pages, using the need_datasource event. Now it's going to get a bit more complicated when I have 8 different items I can sort or filter.
I basically need to get the filter and convert that filter and sorting into the sql statement that I use to query the database.
I also basically have to make 2 queries to get the VirtualItemCount.
I'm basically doing a "select ROW_NUMBER() OVER" to make my row numbers and only getting the range of row numbers I want. SQL Server 2012 has a fetch(I have 2008) and I saw there's a more effecient way than ROW_NUMBER() OVER, but this is easy for me to manipulate. My main concern is CPU and memory on the webserver, so getting back just the number of rows in the page is the most important.
I'm guessing this is the best way to do it. (I'm not going to use entity framework).
I think the hard part is me translating the filters and sort orders to my sql statement. I was wondering if there was an example like this. No big deal if there isn't, I don't think it will be a big deal to do it, but I was wondering if maybe there was some code out there that already existed.
I basically need to get the filter and convert that filter and sorting into the sql statement that I use to query the database.
I also basically have to make 2 queries to get the VirtualItemCount.
I'm basically doing a "select ROW_NUMBER() OVER" to make my row numbers and only getting the range of row numbers I want. SQL Server 2012 has a fetch(I have 2008) and I saw there's a more effecient way than ROW_NUMBER() OVER, but this is easy for me to manipulate. My main concern is CPU and memory on the webserver, so getting back just the number of rows in the page is the most important.
I'm guessing this is the best way to do it. (I'm not going to use entity framework).
I think the hard part is me translating the filters and sort orders to my sql statement. I was wondering if there was an example like this. No big deal if there isn't, I don't think it will be a big deal to do it, but I was wondering if maybe there was some code out there that already existed.