FilterExpressions - Not available after update?

2 posts, 0 answers
  1. Terry
    Terry avatar
    39 posts
    Member since:
    Sep 2007

    Posted 12 Aug 2014 Link to this post


    I've recently updated to the latest version of WinConrols UI (2014.2.715.40) after realising that MasterGridViewTemplate is now MasterTemplate
    It now reports that filterexpressions properties are no longer valid.

    What's the best way to update the code below? It essentially saves the filters to a sql table.

    Dim feCollection As FilterExpression() = New FilterExpression(grid.MasterTemplate.FilterExpressions.Count) {}
            Dim i As Integer = 0
            While i < grid.MasterTemplate.FilterExpressions.Count
                InsertJobLibraryFilterValues(grid.Name, grid.MasterTemplate.FilterExpressions(i).PropertyName, grid.MasterTemplate.FilterExpressions(i).Operator, grid.MasterTemplate.FilterExpressions(i).Value, iFilterGroupID)
                i = i + 1
            End While

            Return feCollection

  2. Stefan
    Stefan avatar
    2911 posts

    Posted 13 Aug 2014 Link to this post

    Hi Terry,

    Thank you for writing.

    In Q2 2014 we have removed a lot of obsolete code from our codebase, including the mentioned properties. Information about the removed members and what to use instead is available in our Release Notes

    As to the case at hand, you code should look something like this:
    Dim feCollection As FilterDescriptor() = New FilterDescriptor(radGridView1.MasterTemplate.FilterDescriptors.Count - 1) {}
    Dim i As Integer = 0
    While i < radGridView1.MasterTemplate.FilterDescriptors.Count
        InsertJobLibraryFilterValues(radGridView1.Name, radGridView1.MasterTemplate.FilterDescriptors(i).PropertyName, radGridView1.MasterTemplate.FilterDescriptors(i).[Operator], radGridView1.MasterTemplate.FilterDescriptors(i).Value, iFilterGroupID)
        i = i + 1
    End While
    Return feCollection

    I hope this helps.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top