Problem selecting text when using FilteringMode="FilterRow"

3 posts, 1 answers
  1. Steve
    Steve avatar
    20 posts
    Member since:
    Jan 2011

    Posted 26 May Link to this post

    Launch the Telerik WPF Demos, and go to the "Filtering Configuration" demo.

    Change the FilteringMode to FilterRow

    Type some text in one of the filter textboxes

    Using your mouse, attempt to click and drag to highlight this text.

    The column reordering mechanism of the grid kicks in, instead of highlighting the text as would be expected.

     

    Is there any way to change this behaviour?

     

    Thanks

  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 27 May Link to this post

    Hello Steve,

    The issue you have reported is known to us and we are currently working on a fix. In the meantime, you can make use of the following workaround (assuming your RadGridView has a Name equal to clubsGrid):

    public MainWindow()
    {
        InitializeComponent();
        this.clubsGrid.FieldFilterEditorCreated += clubsGrid_FieldFilterEditorCreated;
    }
      
    private void clubsGrid_FieldFilterEditorCreated(object sender, Telerik.Windows.Controls.GridView.EditorCreatedEventArgs e)
    {
        e.Editor.AddHandler(FrameworkElement.MouseEnterEvent, new MouseEventHandler(OnMouseEnter), true);
        e.Editor.AddHandler(FrameworkElement.MouseLeaveEvent, new MouseEventHandler(OnMouseLeave), true);
    }
      
    private void OnMouseLeave(object sender, MouseEventArgs e)
    {
        var parentHeaderCell = (sender as FrameworkElement).ParentOfType<GridViewHeaderCell>();
        if (parentHeaderCell != null)
        {
            DragDropManager.SetAllowDrag(parentHeaderCell, true);
        }
    }
      
    private void OnMouseEnter(object sender, MouseEventArgs e)
    {
        var parentHeaderCell = (sender as FrameworkElement).ParentOfType<GridViewHeaderCell>();
        if (parentHeaderCell != null)
        {
            DragDropManager.SetAllowDrag(parentHeaderCell, false);
        }
    }

    I hope you find this helpful.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Steve
    Steve avatar
    20 posts
    Member since:
    Jan 2011

    Posted 01 Jun in reply to Dilyan Traykov Link to this post

    Thanks Dilyan, that works perfectly!
Back to Top