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

Force raddomaindatasource to load when something changes on raddatafilter??

2 Answers 110 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Edward Pauley
Top achievements
Rank 1
Edward Pauley asked on 05 Jul 2011, 11:41 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 06 Jul 2011, 08:15 AM
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!

0
ytkaczyk
Top achievements
Rank 1
answered on 06 Dec 2011, 07:15 PM
Thank you Ross. I needed to detect changes to the filters and this is just what I was looking for. 

Thanks again,

Yves Tkaczyk
Tags
DataFilter
Asked by
Edward Pauley
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
ytkaczyk
Top achievements
Rank 1
Share this question
or