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

Telerik Radgrid enablelinqexpressions when set to true still the filter expression returned is in SQL format

5 Answers 188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anup
Top achievements
Rank 1
Anup asked on 13 Jan 2016, 02:19 PM

I have a telerik radgrid used on my page.I have set the enablelinqexpressions property to true. What i read in blog was when we set this property we get the filter expression in the linq format like this - "(iif(Message == null, \"\", Message).ToString().ToUpper().Contains(\"f2e\".ToUpper()))" but i am still getting the filter expression in the SQL format.

 Am i missing any thing ?

 

Please find below few of my radgrid code snippet:

<telerik:RadGrid ID="gridResults" runat="server" AllowFilteringByColumn="True"
        AllowPaging="True" AllowCustomPaging="True" AllowSorting="True" AutoGenerateColumns="False"
        CellSpacing="0" EnableAJAX="True" GridLines="None" PageSize="20" Skin="Windows7"
        OnNeedDataSource="gridResults_NeedDataSource" OnItemCommand="gridResults_ItemCommand" Visible="False">
        <GroupingSettings CaseSensitive="False" />
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" />
        <ExportSettings OpenInNewWindow="true" ExportOnlyData="true" HideStructureColumns="true" />
        <MasterTableView CommandItemDisplay="Top" AllowMultiColumnSorting="False">
            <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowRefreshButton="false" />
            <SortExpressions>
                <telerik:GridSortExpression FieldName="Timestamp" SortOrder="Descending" />
            </SortExpressions>

5 Answers, 1 is accepted

Sort by
0
Anup
Top achievements
Rank 1
answered on 13 Jan 2016, 02:21 PM
Just missed to mentioned that the property enablelinqexpressions  is set to true which i missed in the above code snippet
0
Eyup
Telerik team
answered on 18 Jan 2016, 11:52 AM
Hello Anup,

The EnableLinqExpressions property is enabled by default. I've created a sample RadGrid web site to demonstrate that the filter expression is built as expected. Please run the attached application and let me know about the result.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Anup
Top achievements
Rank 1
answered on 18 Jan 2016, 11:59 AM

Hi Eyup,

Thanks for the reply.

I went through your sample code. But i problem here is I have a List collection which i am bind to the grid in the needdatasource event.

and the filterexpression i am getting is in SQL format. so when i try to filter my collection with grid filter expression it gives me an error.

0
Anup
Top achievements
Rank 1
answered on 18 Jan 2016, 12:01 PM

Hi Eyup,

I am expecting the filter expression is linq format. Why i am getting the same in SQL format.

0
Eyup
Telerik team
answered on 21 Jan 2016, 09:21 AM
Hello Anup,

I suggest that you modify the provided sample to demonstrate the described problem and open a formal support ticket to send it back to us.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Anup
Top achievements
Rank 1
Answers by
Anup
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or