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

Prevent filter menu operator dropdown from closing on scroll

4 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahat Ahmed
Top achievements
Rank 1
Rahat Ahmed asked on 29 Oct 2015, 08:12 PM

I'm having an issue with the operator dropdown in the filter menu of my grid closing after I scroll to the top or bottom of the option list. I found this example on how to prevent that, but I can't figure out how to access the operator dropdown in the grid menu (I'm using angular directives, if that makes a difference)?

I also noticed that some of the grid examples have this behavior, but don't seem to use the method above. Is there another way to get this behavior?

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 02 Nov 2015, 03:21 PM

Hello Rahat,

 

The idea shown in the how-to article can be applied to the Grid scrollable container, in order to prevent the scroll propagation to the parent scrollable container. This will also prevent the popup instances from closing. A test page which demonstrates this can be found here.

 

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rahat Ahmed
Top achievements
Rank 1
answered on 02 Nov 2015, 03:26 PM
That test page doesn't seem to fix the issue with the operator dropdown closing if you scroll on top of it.
0
Accepted
Rosen
Telerik team
answered on 03 Nov 2015, 12:18 PM

Hello Rahat,

In order to apply the approach from the dropdownlist how-to to the DropDownList widget in the filter, you should use the filterMenuInit event of the Grid widget. Similar to the following:

filterMenuInit: function(e) {
  e.container.find("[data-role=dropdownlist]").each(function() {
    var widget = $(this).data("kendoDropDownList");
 
    stopScroll(widget.ul.parent());
  });
}

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rahat Ahmed
Top achievements
Rank 1
answered on 03 Nov 2015, 03:40 PM
Works like a charm! Only had to change filterMenuInit to columnMenuInit because I set columnMenu to true.
Tags
Grid
Asked by
Rahat Ahmed
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Rahat Ahmed
Top achievements
Rank 1
Share this question
or