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

Grid filtering issue with decimal column

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Garrett
Top achievements
Rank 1
Garrett asked on 31 Jul 2014, 01:51 PM
Hello!

I have a simple grid with a sql data source attached and when I filter my decimal column with a value like .01 it returns an error message that I will paste below, but if I try filtering by 0.01 it works. Is this intentional and if not, is there a fix for this?

Thanks!


Expression expected
 
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: Telerik.Web.UI.ParseException: Expression expected
 
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:
 
 
[ParseException: Expression expected]
   Telerik.Web.UI.ExpressionParser.ParsePrimaryStart() +245
   Telerik.Web.UI.ExpressionParser.ParsePrimary() +47
   Telerik.Web.UI.ExpressionParser.ParseUnary() +404
   Telerik.Web.UI.ExpressionParser.ParseMultiplicative() +54
   Telerik.Web.UI.ExpressionParser.ParseAdditive() +54
   Telerik.Web.UI.ExpressionParser.ParseComparison() +128
   Telerik.Web.UI.ExpressionParser.ParseLogicalAnd() +49
   Telerik.Web.UI.ExpressionParser.ParseLogicalOr() +49
   Telerik.Web.UI.ExpressionParser.ParseExpression() +74
   Telerik.Web.UI.ExpressionParser.ParseParenExpression() +68
   Telerik.Web.UI.ExpressionParser.ParsePrimaryStart() +169
   Telerik.Web.UI.ExpressionParser.ParsePrimary() +47
   Telerik.Web.UI.ExpressionParser.ParseUnary() +404
   Telerik.Web.UI.ExpressionParser.ParseMultiplicative() +54
   Telerik.Web.UI.ExpressionParser.ParseAdditive() +54
   Telerik.Web.UI.ExpressionParser.ParseComparison() +69
   Telerik.Web.UI.ExpressionParser.ParseLogicalAnd() +49
   Telerik.Web.UI.ExpressionParser.ParseLogicalOr() +49
   Telerik.Web.UI.ExpressionParser.ParseExpression() +74
   Telerik.Web.UI.ExpressionParser.Parse(Type resultType) +76
   Telerik.Web.UI.DynamicExpression.ParseLambda(ParameterExpression[] parameters, Type resultType, String expression, Object[] values) +92
   Telerik.Web.UI.DynamicExpression.ParseLambda(Type itType, Type resultType, String expression, Object[] values) +132
   Telerik.Web.UI.GridDynamicQueryable.Where(IQueryable source, String predicate, Object[] values) +235
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +3948
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1078
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +58
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +45
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +36
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, DataView dataView, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +244
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +109
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +755
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +257
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +733
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +1287
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
   Telerik.Web.UI.GridTableView.DataBind() +388
   Telerik.Web.UI.GridTableView.Rebind() +108
   Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source) +1105
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +205
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +71
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +147
   Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument) +88
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +12376
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9528682
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 01 Aug 2014, 05:37 AM
Hi Garrett,

Please set EnableLinqExpressions="false" for your RadGrid to avoid this error.

ASPX:
<telerik:RadGrid ID="rgrdSample" runat="server" AllowFilteringByColumn="true" EnableLinqExpressions="false". . >

Thanks,
Shinu
Tags
Grid
Asked by
Garrett
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or