开发者

RefreshEventName for filtering on ria services for visual studio 2010

In ria services for silverlight 3 there was a functionality through RefreshEventName in order to control when a filter should be applied to the domain service query. (usually set to TextChanged)

In the new implementation of ria (visual studio 2010) the only way to set the filters of a query is by using a filterDescriptor along with binding like the following example:

    <riaControls:DomainDataSource x:Name="myData" LoadSize="50" QueryName="GetPartnerCategoriesQuery" AutoLoad="True">
        <riaControls:DomainDataSource.DomainContext>
            <ds:DataAccessContext />
        </riaControls:DomainDataSource.DomainContext>
        <riaControls:DomainDataSource.FilterDescriptors>
            <riaControls:FilterDescriptor PropertyPath="Descr" Operator="Contains" Value="{Binding Text,ElementName=txtFilter}" 
                                          IsCaseSensitive="False" IgnoredValue=""  />
        </riaControls:DomainDataSource.FilterDescriptors>开发者_StackOverflow;
    </riaControls:DomainDataSource>

Is there a way to control on when the filter should be applied? The default setting is magically set to TextChanged. I am looking for a way to set the filters on LostFocus event, or even better using a button.


Thought of a way to implement a "press button to search" functionality. Instead of binding the filterDescriptors to elements (textboxes etc) i bind them to properties on codebehind. When the user clicks the search button i just copy the values of the controls to the properties.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜