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

Filter Error: Cast Not Valid

2 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark Galbreath
Top achievements
Rank 2
Mark Galbreath asked on 19 Feb 2010, 04:11 PM
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 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 19 Feb 2010, 05:11 PM
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.
0
Mark Galbreath
Top achievements
Rank 2
answered on 19 Feb 2010, 06:38 PM
The database datatype is Oracle number, and I've tried declaring every numeric datatype in the grid column definition with the same result.

Mark
Tags
Grid
Asked by
Mark Galbreath
Top achievements
Rank 2
Answers by
robertw102
Top achievements
Rank 1
Mark Galbreath
Top achievements
Rank 2
Share this question
or