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

Unhandled Exception when filtering columns

4 Answers 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 28 Mar 2012, 05:42 PM
Trying to use the Radgrid to do server-side data filtering.  

I'm binding a dataset to a RadGrid, and setting the AutoPostBackOnFilter='true' for each column.  Clicking on the filter button throws this unhandled exception.


Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +11025
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

4 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 28 Mar 2012, 05:44 PM
I've tried setting EnableLinqExpressions="false"
0
Ryan
Top achievements
Rank 1
answered on 28 Mar 2012, 06:24 PM
Additional Stack Trace Details

[NullReferenceException]: Object reference not set to an instance of an object.
   at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.frontoffice_ordersearch_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\tmspages\1194c3dd\c23f8257\App_Web_ordersearch.aspx.53685faf.dif4z4ww.0.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
0
Ryan
Top achievements
Rank 1
answered on 28 Mar 2012, 06:44 PM
<telerik:RadGrid ID="testGrid" runat="server" AutoGenerateColumns="false" EnableLinqExpressions="false">
     <MasterTableView Width="100%" Height="100%" AllowFilteringByColumn="true"  EnableLinqGrouping="false">
          <Columns>
             <telerik:GridBoundColumn DataField="OrderNumber" HeaderText="OrderNumber">
             </telerik:GridBoundColumn>
         </Columns>
     </MasterTableView>
     <ClientSettings>
         <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
         </Scrolling>
     </ClientSettings>
 </telerik:RadGrid>
Grid markup code.
0
Milena
Telerik team
answered on 02 Apr 2012, 08:56 AM
Hello,

I tried to reproduce the unwanted behavior, but to no avail. Attached, you can find the project, which I used for testing. Could you review it and let me know what I am missing in replicating the issue? In case, you have some comments on this matter, please let me know about them in the support ticket, you have opened about the same issue.

Thank you in advance for your cooperation.

All the best,
Milena
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Milena
Telerik team
Share this question
or