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

Bug: Exceptions thrown by RadFilter on operations with zero operands

5 Answers 132 Views
Filter
This is a migrated thread and some comments may be shown as answers.
apb
Top achievements
Rank 1
apb asked on 26 Apr 2010, 06:22 PM
RadFilter doesn't seem to like IsNull, NotIsNull, IsEmpty, and NotIsEmpty.

I've tried this with both RadFilterTextFieldEditor and RadFilterNumericFieldEditor field editors.

Also, you can observe this problem on your own demos -- the page doesn't diplay the error, but got to a dummy page that says: "Sorry, we couldn't find the page you're looking for."


An error occurred while processing your request. If the problem continues, please contact customer support.   
 
Exception of type 'System.Web.HttpUnhandledException' was thrown.   
 
==> Object reference not set to an instance of an object.    
 
Stack Traces  
Source: System.Web  
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.junk_filter3_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\bit9.console.web.ui\f02bb933\1bce73bb\App_Web_filter3.aspx.83447962.24ra8t1t.0.cs:line 0  
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  
 
==> Source: Telerik.Web.UI  
at Telerik.Web.UI.RadFilterTextFieldEditor.ExtractValues()  
at Telerik.Web.UI.RadFilterSingleExpressionItem.ExtractValues()  
at Telerik.Web.UI.RadFilter.FetchExpressionsValues(RadFilterGroupExpressionItem group)  
at Telerik.Web.UI.RadFilter.HandleApplyCommand()  
at Telerik.Web.UI.RadFilterCommandEventArgsFactory.HandleCommand(RadFilter ownerFilter, Object commandSource, RadFilterCommandEventArgs args)  
at Telerik.Web.UI.RadFilter.OnBubbleEvent(Object source, EventArgs args)  
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)  
at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)  
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)  
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.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)  

5 Answers, 1 is accepted

Sort by
0
apb
Top achievements
Rank 1
answered on 26 Apr 2010, 06:25 PM
Is there a way to selectivly hide these options until the bug is fixed? I can't release this to my users with it crashing.
0
Nikolay Rusev
Telerik team
answered on 28 Apr 2010, 09:15 AM
Hello apb,

We are aware of this problem with RadFilter and fix will be available in one of the upcoming internal builds. If you need to temporary hide some options you can use the following code:

01.<script type="text/javascript">
02.    function filterCreated(sender, args)
03.    {
04.        sender.get_contextMenu().add_showing(
05.            function(sender, args)
06.            {
07.                sender.findItemByValue("IsNull").set_visible(false);
08.                sender.findItemByValue("NotIsNull").set_visible(false);
09.            }
10.        );
11.    }
12.</script>


Kind regards,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Reto Zbinden
Top achievements
Rank 1
answered on 09 May 2010, 03:54 PM
hello

this sounds like a solution for my code.

but i don't know how/where to invoke this script. i copied it into the head but nothing happened of course.

could you give me furthur instructions like to which event of the RadFilter i have to bind this function, e.g. with RadFilter1.Attributes.Add("","javascript:filterCreated");, to get it working?

0
Nikolay Rusev
Telerik team
answered on 10 May 2010, 01:37 PM
Hello Reto,

RadFilter has options for attaching client event handler. In the markup you do as follow:
1.<telerik:RadFilter runat="server" ID="Some ID">
2. <ClientSettings>
3.  <ClientEvents OnFilterCreated="filterCreated" />
4. </ClientSettings>
5.</telerik:RadFilter>


Greetings,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Raji
Top achievements
Rank 1
answered on 21 Jul 2011, 10:52 PM
Hi,
Has the problem been fixed in the later versions. I tried your suggestions but I get this error this._contextMenu is null or not a object. I copied the javascript into RadCodeBlock. I also copied it as normal javascript.

<

 

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

 

function filterCreated(sender, args)

 

{

sender.get_contextMenu().add_showing(

 

function(sender, args)

 

{

sender.findItemByValue(

"IsNull").set_visible(false);

 

sender.findItemByValue(

"NotIsNull").set_visible(false);

 

sender.findItemByValue(

"Between").set_visible(false);

 

sender.findItemByValue(

"NoBetween").set_visible(false);

 

sender.findItemByValue(

"NotEqualTo").set_visible(false);

 

}

)

}



 

</script>

 

 

</telerik:RadCodeBlock>

 

Tags
Filter
Asked by
apb
Top achievements
Rank 1
Answers by
apb
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Reto Zbinden
Top achievements
Rank 1
Raji
Top achievements
Rank 1
Share this question
or