I'm trying to fix up a page so that the RadGrid has working filters. This has been fine on other pages, but the presence of a GridBoundColumn with a join in the DataField, and a GridCalculatedColumn is making this difficult.
My findings:
- Originally, EnableLinqExpressions ("ELE") was set to "false", but this meant that filtering didn't work
- ELE = false and removing the Calculated field --> Filtering works
- ELE = false and removing the Joined filed --> Filtering is broken
- ELE = true --> I get a Telerik.Web.UI.ParseException: ')' or ',' expected. No clear column as the culprit, error seems derived from the GridyDynamicQueryable.Select()
- ELE = true and removing Calculated field --> Filtering works
- ELE = true and removing Joined field --> Filtering works
And my boiled-down code:
<telerik:RadGrid ID="rgdInvoices" runat="server" DataSourceID="ldsInvoices" AutoGenerateColumns="false" AllowFilteringByColumn="true" EnableLinqExpressions="true" ShowFooter="true"> <MasterTableView DataKeyNames="InvoiceID" EditMode="InPlace"> <Columns> <telerik:GridBoundColumn UniqueName="BookingName" DataField="WEB_Booking.JobName" HeaderText="Job Name" AutoPostBackOnFilter="true" ShowFilterIcon="false" /> <telerik:GridNumericColumn UniqueName="SubTotal" DataField="SubTotal" ReadOnly="true" HeaderText="Sub Total" NumericType="Currency" FilterControlWidth="120px" Aggregate="Sum" FooterAggregateFormatString="{0:c}" /> <telerik:GridCalculatedColumn UniqueName="GST" HeaderText="GST" DataType="System.Decimal" DataFormatString="{0:c}" DataFields="SubTotal" Expression="{0}*0.1" Aggregate="Sum" FooterAggregateFormatString="{0:c}" /> </Columns> </MasterTableView> </telerik:RadGrid>