This is a migrated thread and some comments may be shown as answers.

[Solved] Multi Column sort using entitydatasource

2 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
phani vikram jungali
Top achievements
Rank 1
phani vikram jungali asked on 05 Oct 2009, 11:45 PM

Hi

We are currently using EntityDataSource to bind data to grid. Currently sorting on single column works fine.

When I enable multi column sorting on grid it gives me the below error. But Multi column sorting works fine with Object Datasource.

 

Below are the error details.

 

'QueueId' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near simple identifier, line 18, column 1. 

 

Regards

Vikram

2 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 08 Oct 2009, 11:08 AM
Hello Vikram,

I tried to reproduce the issue allowing multi-column sorting on this example of RadGrid for ASP.NET AJAX:

http://demos.telerik.com/aspnet-ajax/grid/examples/automaticoperations/efdatabinding/defaultcs.aspx

but my attempts were not successful.

Can you please confirm that the same scenario works properly when you replace the grid with MS GridView instance (attached to your EntityDataSource) and perform single sorting on the QueueId column? Furthermore, I think that the discussions from the public threads linked below can help you identify the cause of the erroneous behavior to address it asap:

http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/feed49ec-fad8-4218-bbca-19d3039d745f

http://stackoverflow.com/questions/695878/entity-framework-generic-repository-error

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
phani vikram jungali
Top achievements
Rank 1
answered on 08 Oct 2009, 06:10 PM
Hi

I could resolve the issue.
The problem was using sort expression in grid.

When we enable multi column sort in grid we have to use it.[columnname] in the sort expression. Earlier  i was using just the column name(Strangely it works fine for single column sort but not multi column sort).

Regards
Vikram
Tags
Grid
Asked by
phani vikram jungali
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
phani vikram jungali
Top achievements
Rank 1
Share this question
or