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

[Solved] What is wrong with this filterexpression

4 Answers 298 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 02 Apr 2009, 03:32 PM
What is wrong with this filterexpression:

selectConditon = "([IMP_MATCHINGFELD_WERT] = 'NGEE010041')" 
m_G1.MasterTableView.FilterExpression = selectConditon  
m_G1.MasterTableView.DataBind() 

I get the error: "Expression expected"

thanks

Christian

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Apr 2009, 04:22 AM
Hi Christian,

Can you try with the following approach and see whether it helps.

VB:
 
    RadGrid1.MasterTableView.FilterExpression = "([IMP_MATCHINGFELD_WERT] = 'NGEE010041') " 
    Dim column As GridColumn = RadGrid1.MasterTableView.GetColumnSafe("IMP_MATCHINGFELD_WERT"
    column.CurrentFilterFunction = GridKnownFunction.EqualTo 
    column.CurrentFilterValue = "NGEE010041" 
    RadGrid1.MasterTableView.Rebind() 

How do you bind the Grid? If you are using simple-Data binding try using AdvanceDataBinding techinques.

Thanks
Shinu
0
Christian
Top achievements
Rank 1
answered on 03 Apr 2009, 06:55 AM
I have tried the following code:


        selectConditon = "([IMP_MATCHINGFELD_WERT] = 'NGEE010041')" 
        m_G1.MasterTableView.FilterExpression = selectConditon  
        Dim column As GridColumn = m_G1.MasterTableView.GetColumnSafe("IMP_MATCHINGFELD_WERT")  
        column.CurrentFilterFunction = GridKnownFunction.EqualTo  
        column.CurrentFilterValue = "NGEE010041" 
        m_G1.MasterTableView.Rebind() 

 But it doesn't work, I get the same error "Expression expected".

I build the RadGrid complete with code behind.


The Sort event is working fine:
            m_G1.MasterTableView.SortExpressions.AddSortExpression(sortExp)  
            m_G1.MasterTableView.Rebind() 

Christian
0
Michael Milligan
Top achievements
Rank 1
answered on 11 Mar 2010, 11:19 PM
We get the same error message. This filter expression worked when we were using the trial version from 2009. It just started happening since we downloaded the latest release from 2010 (on march 9th 2010).

this.auditRadGrid.MasterTableView.FilterExpression = "([Status] = \'Failed\')"
0
Yavor
Telerik team
answered on 15 Mar 2010, 10:13 AM
Hi Michael,

Is the exception eliminated, when you set the .EnableLinqExpressions of the grid to "false"?
Additionally, if the problem persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and the exception. We will review it locally, and advise you further.

Best wishes,
Yavor
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Christian
Top achievements
Rank 1
Michael Milligan
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or