Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
How do I set the cursor on the Filter after a filter has been cleared on DataGrid?
posted

Similar to what this post http://www.infragistics.com/community/forums/t/65920.aspx does but I would like to do this when a record filter has been clear is to set the cursor in the filter.

I was gonna do this event on the OnRecordFilterChanged , what would be the best way to approach this?

Parents
No Data
Reply
  • 16495
    Offline posted

    Hello Dev,

     

    Thank you for your post.

     

    I have been looking into the functionality that you are looking for and what I can suggest is to copy the default style for FilterCellValuePresenter which can be found here by default:

     

    C:\Program Files (x86)\Infragistics\2015.1\WPF\DefaultStyles\DataPresenter\ DataPresenterGeneric_Express.xaml file

     

    You can copy this style into the Window resources or Application resources of your application. Then you can find the Clear Button and just handle its Click event. In the event handler by the sender and GetChild method of   VisualTreeHelper you can access the filter`s XamComboEditor and set its IsSelected property to true. It is recommended to set this property in background by using the BeginInvoke method of Dispatcher. This way  you will be able to set the cursors to the filter after it has been cleared.  I created short sample application based on your scenario to show you how you can implement this approach.

     

    Please let me know if you require any further assistance on the matter.

     

    SetCursorOnTheFilter.zip
Children