The problem I have is if I enable sorting, I get an exception if I change
the linq query to one with different columns after a postback.
Essentially in the LinqDataSource1_Selecting LinqDataSourceSelectEventArgs e
e.Arguments.sort.expression has a value that contains a column that is not
in the new linq query and it barfs.
Is there a way to clear this value on a postback.
I tried reseting the Grids datasource and nulling the LinqDataSource, but
nothing worked.
Why you need reset the LinqDatasource? It sounds you had better build a
Datasource object by Linq dynamically, don't you?
http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-
the-linq-dynamic-query-library.aspx
Does that make sense?
--
Sincerely,
Vince Xu
Microsoft Online Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
--------------------
| Thread-Topic: Linq data source selecting and sort
| thread-index: AcqrZ8sXkM7ZlmAIRzCZYN5crffNug==
| X-WBNR-Posting-Host: 192.12.184.2
| From: Chuck <nosp...@nospam.nospam>
| Subject: Linq data source selecting and sort
| Date: Thu, 11 Feb 2010 14:16:01 -0800
| Lines: 19
| Message-ID: <EA9BEBCA-E70F-41A2...@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:5080
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
Since I didn't get your response. Is that helpful for you?
--
Sincerely,
Vince Xu
Microsoft Online Support
--------------------
| X-Tomcat-ID: 75046067
| References: <EA9BEBCA-E70F-41A2...@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-vi...@online.microsoft.com (Vince Xu [MSFT])
| Organization: Microsoft
| Date: Fri, 12 Feb 2010 06:57:41 GMT
| Subject: RE: Linq data source selecting and sort
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
| Message-ID: <ptxBxC7q...@TK2MSFTNGHUB02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| Lines: 82
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:5081
| NNTP-Posting-Host: tk2tomimport1.phx.gbl 10.230.18.247
Sorry for the late response, every month or two my notifications to
responses on the forums and newsgroups stop.