FilterDescriptor only filters on data load

6 posts, 0 answers
  1. Oliver
    Oliver avatar
    5 posts
    Member since:
    Jul 2011

    Posted 12 May 2012 Link to this post

    Hi everyone,

    I really hope someone can help with this tricky issue. I have a gridview with a filterdescriptor to filter out any inactive contacts for a customer;

    <telerik:RadGridView  ItemsSource="{Binding Customers_Contacts, Mode=OneWay}"...
                            <telerik:RadGridView.FilterDescriptors>
                                <telerik:FilterDescriptor Member="SafeInActive" IsCaseSensitive="True" Operator="IsEqualTo" Value="False" />
                            </telerik:RadGridView.FilterDescriptors>

    This all seems to work fine when a change the datacontext to the customer, the list then filters the Customers_Contacts related entity list for the customer only showing active customers..

    The problem I am having is whehn I set one of the contacts in the list to be inactive it is not filtered out of the list??

    Any ideas?

    Thanks

    Mark
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 May 2012 Link to this post

    Hello,

     As I understand you edit a single value in code behind and the filter is not applied.

    If this is the case, then you should inform the GridView that the collection has changed. You may do this like so: 

    myGridView.Items.EditItem(editedItem);
    // change the value
     myGridView.Items.CommitEdit();

    Please let me know how it works.

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 01 Dec 2013 Link to this post

    I have the following code and still the grid isn't filtering.  Am I missing something ?


    private void AddFilterDescriptor(string Member, FilterOperator Operator, object Value)
    {
        rgvExpenses.FilterDescriptors.Clear();
        FilterDescriptor filter = new FilterDescriptor();
        filter.Member = Member;
        filter.Operator = Operator;
        filter.Value = Value;
        rgvExpenses.FilterDescriptors.Add(filter);
        rgvExpenses.Items.CommitEdit();
    }


    2013.3.1016.1050

  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Dec 2013 Link to this post

    Hi,

    Would you please ensure there is a valid Member to filter on? Do you have all the records still presented after you executed the shared code?

    As an additional note, you do not need to commit the edit unless you are already editing.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 02 Dec 2013 Link to this post

    It's all right it works.  I was just not filtering enough columns to see the change.  Thank you
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Dec 2013 Link to this post

    Hi,

    I am glad to hear that.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner