Fields on related fields, server side paging and sorting

Posts   
 
    
Darren166
User
Posts: 41
Joined: 30-Jan-2007
# Posted on: 30-Jan-2007 15:32:54   

Self serving, asp.net 2, latest build of V2.

I know that if I have a gridview based on a llblgenprodatasource and want to be able to sort on a field on related field, I have to set the datasource control to client side sorting. However, I also need the paging control set on the datasource as there are thousands of records. This means obviously that only one page gets sorted. Is there a way around this?

Darren

Aurelien avatar
Aurelien
Support Team
Posts: 162
Joined: 28-Jun-2006
# Posted on: 30-Jan-2007 15:53:51   

Did you try to set paging on gridview by setting the property AllowPaging to True instead of using paging on llblgenprodatasource ?

Darren166
User
Posts: 41
Joined: 30-Jan-2007
# Posted on: 30-Jan-2007 16:03:09   

Yes but due to the number of records, it is a lot slower.

I was hoping that when you have fields on related fields the SQL would generate inner joins with sorting and paging.

Does anybody have a standard way of dealing with this? (I want to edit the table in a codeless manner so I am using an entity collection and a datasource)

Darren

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 31-Jan-2007 04:16:17   

What type of relation do you have between your collection being used for your grid and the entity containing the field you want to sort on?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Jan-2007 10:46:17   

You could sort on the db by setting the sortexpression on the datasourcecontrol. The paging on the client sorts indeed the data in the control, as it doesn't have all the data on the client (obviously, why else would you want to use paging wink ).

Frans Bouma | Lead developer LLBLGen Pro