Bug: Exceptions thrown by RadFilter on operations with zero operands

6 posts, 0 answers
  1. apb
    apb avatar
    46 posts
    Member since:
    Nov 2008

    Posted 26 Apr 2010 Link to this post

    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)  
  2. apb
    apb avatar
    46 posts
    Member since:
    Nov 2008

    Posted 26 Apr 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 28 Apr 2010 Link to this post

    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.
  5. Reto Zbinden
    Reto Zbinden avatar
    3 posts
    Member since:
    Apr 2010

    Posted 09 May 2010 Link to this post

    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?

  6. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 10 May 2010 Link to this post

    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.
  7. Raji
    Raji avatar
    56 posts
    Member since:
    Jul 2011

    Posted 21 Jul 2011 Link to this post

    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>

     

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017