Filter Error: Cast Not Valid

3 posts, 0 answers
  1. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 19 Feb 2010 Link to this post

    I'm using 2009.3.1314 and I have started getting exceptions from the Microsoft AJAX incporated into the control when I try to filter on a column containing numbers.  The column setup in the aspx:
    <telerik:GridBoundColumn DataField = "PRICE" 
        HeaderText = "PRICE" 
        HeaderTooltip = "AMDF Price of new item"   
        DataType="System.Int32"    
        EmptyDataText="No Data" 
        FilterListOptions="VaryByDataType" 
        FilterImageToolTip="Use numbers only with filter!"   
        ItemStyle-HorizontalAlign = "Right"    
        EditFormColumnIndex = "2" 
        UniqueName = "price" 
        DataFormatString = "{0:c0}">  
    </telerik:GridBoundColumn> 
     
    And when I insert a number in the filter textbox and select, say, "Greater Than," the following error occurs:
    A Runtime Error has occurred.  
     
    Line 6  
    Error:Sys.Webforms.PageRequestManagerServerErrorException:  
    Specified cast is not valid. 
    Line 6 is the function:
    /* START MicrosoftAjax.js */  
    //----------------------------------------------------------  
    // Copyright (C) Microsoft Corporation. All rights reserved.  
    //----------------------------------------------------------  
    // MicrosoftAjax.js  
    Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){  
     // 60,000 characters of code  
    }  
    Assertion Failed: {0}","invalidOperation":"Operation is not valid due to the current state of the object.","breakIntoDebugger":"{0}\r\n\r\nBreak into debugger?"};  
    /* END MicrosoftAjax.js */ 

    Is this a bug?

    Cheers!
    Mark
  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 19 Feb 2010 Link to this post

    Is the field your filtering actually an integer or is a decimal? I think that might be the issue, the data type must not be matching up.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 19 Feb 2010 Link to this post

    The database datatype is Oracle number, and I've tried declaring every numeric datatype in the grid column definition with the same result.

    Mark
Back to Top