Force raddomaindatasource to load when something changes on raddatafilter??

3 posts, 1 answers
  1. Edward Pauley
    Edward Pauley avatar
    48 posts
    Member since:
    May 2010

    Posted 05 Jul 2011 Link to this post

    Hi 

    radDatafilter +radGridView + radDataPager + radDomainDatasource

    if the AutoLoad = "True" of raddomaindatasource is set, then the integration between the raddatafilter and raddomaindatasource works perfectly. Meaning that if there is something changed on the raddatafilter then the raddomaindatasource will automatically call the Load() method to refresh the data

    However, if AutoLoad="False" , then it seems like that the radDatafilter only do the client side filter (meaning filtering items which are available in the radgridview paged). 

    So my question is that which event of the radDatafilter i should use in order to manually call the raddomaindatasource.Load() inside that event whenever the value on the filter has been change, or the filter is deleted (JUST LIKE THE NORMAL BEHAVIOR of raddatafilter with AutoLoad = true)  but in this case it is AutoLoad = false

    Note: I can only use autoload = false, because i need to do some logic for my scene and there are some bugs with the autoload=true (hard to explain, need sample project to produce it and i don't have time for that). So all of my screens right now use the AutoLoad = false and i manually fire the Load() method of the raddomaindatasource

    thanks
  2. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 06 Jul 2011 Link to this post

    Hi Edward Pauley,

    Here is what you should attach and listen to:

    RadDataFilter.FilterDescriptors.CollectionChanged -> will be fired when top-level filters are being added or removed.

    RadDataFilter.FilterDescriptors.ItemChanged -> will be fired each time something inside a filter (top-level or nested one) changes, i.e. the user enters a new value, changes the operator and so forth.

    These two events cover all possible changes that the user can inflict on RadDataFilter. If you attach to both of them and manually call RDDS.Load() you will be in fact simulating the built-in AutoLoad behavior.

    I hope this helps.

    Let me know if there are problems.

    Greetings,
    Ross
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. ytkaczyk
    ytkaczyk avatar
    1 posts
    Member since:
    Jan 2007

    Posted 06 Dec 2011 Link to this post

    Thank you Ross. I needed to detect changes to the filters and this is just what I was looking for. 

    Thanks again,

    Yves Tkaczyk
Back to Top