This is just a simple demo screenshot - so please dont question the size:
For our product we require sometimes wrapping the Grid in a Div which has a "overflow:hidden" css style. This causes the menus of the filter menu to get cut off - is there a way to change the menus to show them fully?
Example screenshots:
((1) with overflow:hidden (2) without)
|
// Grid’s actionComplete event handler
actionComplete: function(args) {
if (args.requestType === "filterafteropen") {
// Condition executes after the filter dialog is opened
// Retrieve the current filter dialog position
var dlgPosition = args.filterModel.dlgObj.element.getBoundingClientRect();
// The required parent element is set as the filter dialog target
args.filterModel.dlgObj.target = document.getElementById('parent-container');
// The initially retrieved dialog position is set as the filter dialog positions
args.filterModel.dlgObj.position.X = dlgPosition.x;
args.filterModel.dlgObj.position.Y = dlgPosition.y;
// The filter dialog is refreshed to update the changes
args.filterModel.dlgObj.refresh();
}
} |
Thank you, works perfectly!
Ok , have to revert it:
It shows actually an error, I made a mistake on my end but I cannot resolve this:
The error is in this line:
|
actionComplete: function(args) {
if (args.requestType === "filterafteropen") {
// Condition executes after the filter dialog is opened
// Retrieve the current filter dialog position
var dlgPosition = args.filterModel.dialogObj.element.getBoundingClientRect();
// The required parent element is set as the filter dialog target
args.filterModel.dialogObj.target = document.getElementById('parent-container');
// The initially retrieved dialog position is set as the filter dialog positions
args.filterModel.dialogObj.position.X = dlgPosition.x;
args.filterModel.dialogObj.position.Y = dlgPosition.y;
// The filter dialog is refreshed to update the changes
args.filterModel.dialogObj.refresh();
}
}
|
Thanks for the update, but that didnt solve the issue, rather created a new one:
When I use the code, the filter turns from this:
to this:
My guess is that only a certain part gets rearranged.
Also, is there an event before an filter gets openend? Because the flickering when the rect gets changed doesnt look very good.
Also, to add further, the proposed refresh method is deprecated.
Kind regards,
Sebastian Göhring
change refresh to refreshPosition and it works. Edit your answer then I mark it as the solution. Thank you!
Ok, so the problem is deeper hidden then I thought:
Turns out thats a css issue thats known since 2019, and someone actually created a "fix" for this.
In order to acheive my goal, i have to wrap my filter Dialog with the code from this library:
https://github.com/besworks/pop-out
<over-scroll> <pop-out><filterdialog></pop-out> </over-scroll>
How do I do this? (Had to create a second post since editing doesnt work somehow on this post.)
Hi Sebastian,
Thanks for the update
We have checked your shared information and since your provided information was not enough to identify your reported problem at our end. So, before we start providing solution to your query, we need more information for our clarification. Please share the below details that will be helpful for us to provide better solution.
1) Please share your exact requirement with detailed description.
2) Please share your issue scenario in video demonstration format.
3) Please share your exact requirement scenario with pictorial representation.
4) If possible, share any simple issue reproducible sample that would be helpful or us to provide better solution.
Regards,
Rajapandi R
Hi
Replacing refresh with RefreshPosition is not solving the problem,its hidding Text Filters and Clear filter buttons with excel filter menu
Any solution to this problem
Thank You
Hi Praveen,
Thanks for your update
Before we start providing solution to your query, please share the below details that will be helpful for us to provide better solution.
1) Please share your exact requirement with detailed description.
2) share your issue scenario in video demonstration format.
3) Share your complete Grid rendering code.
4) Share your syncfusion package version.
5) Please share your exact requirement scenario with pictorial representation.
6) If possible, share any simple issue reproducible sample that would be helpful or us to provide better solution.
Regards,
Rajapandi R
Hi
Thanks for your response
When I show excel filter using following code suggested by syncfusion team,its not displaying text filters and clear filter items,its showing only search textbox and checkboxes
package version:
@syncfusion/ej2-angular-grids": "19.4.41
code:
grid actionComplete: function(args) {
if (args.requestType === "filterafteropen") {
// Condition executes after the filter dialog is opened
// Retrieve the current filter dialog position
var dlgPosition = args.filterModel.dialogObj.element.getBoundingClientRect();
// The required parent element is set as the filter dialog target
args.filterModel.dialogObj.target = document.getElementById('parent-container');
// The initially retrieved dialog position is set as the filter dialog positions
args.filterModel.dialogObj.position.X = dlgPosition.x;
args.filterModel.dialogObj.position.Y = dlgPosition.y;
// The filter dialog is refreshed to update the changes
args.filterModel.dialogObj.refresh();
}
}
Pic:
changed to
I want to show text filters and clear filter items along with search textbox and checkboxes with the above code,the purpose is to show excel filter popup outside splitter pane,otherwise its hidden inside splitter pane
I cannot provide any sample as I am busy with the release
Its very urgent for production purpose, it will be very useful if you provide faster response
Thank You
Hi Praveen,
Currently, we are validating your reported problem with your shared information, and we will update you the details on or before 14th Oct 2022. Until then we appreciate your patience.
Rajapandi R
Hi Praveen,
Thanks for your patience
Based on your query we have prepared a sample and we suggest you use the below way to achieve your requirement. Please refer the below code example and sample for more information.
|
App.component.html
<div id="parent-container"> <ejs-grid [dataSource]="data" [allowFiltering]='true' height='300px' [allowSorting]="true" [filterSettings]='filterOption' (actionComplete)="actionComplete($event)" > <e-columns> <e-column field="OrderID" headerText="Order ID" textAlign="Right" width="120" ></e-column> <e-column field="ShipCity" headerText="Ship City" width="150"></e-column> </e-columns> </ejs-grid> </div>
App.component.ts
export class AppComponent { data: Object[] = []; selectOptions: any; public filterOption: any;
actionComplete(args: any) { //actionComplete event of Grid if (args.requestType === "filterafteropen") {
// Condition executes after the filter dialog is opened
// Retrieve the current filter dialog position
var dlgPosition = args.filterModel.dialogObj.element.getBoundingClientRect();
// The required parent element is set as the filter dialog target
args.filterModel.dialogObj.target = document.getElementById('parent-container');
// The initially retrieved dialog position is set as the filter dialog positions
args.filterModel.dialogObj.position.X = dlgPosition.x;
args.filterModel.dialogObj.position.Y = dlgPosition.y;
// The filter dialog is refreshed to update the changes args.filterModel.dialogObj.refreshPosition();
} } }
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/sample-1843243988.zip
Screenshot:
With actionComplete event codes Without actionComplete event codes
Regards,
Rajapandi R
Hi
Thanks for your response, but it didn't resolve our issue, As you are using grid without splitter
I am using grid with in splitter pane, grid excel filter popup[ok and cancel buttons] is hidden inside splitter pane when I am using the refreshPosition method. I need to use scrollbar to see excel filter popup ok and cancel buttons, but I am not willing to use scrollbar in that pane
Screenshot: refreshPosition method
when I use refresh method, excel filter popup comes on top of the pane without showing text filters and clear filter buttons
Screenshot: refresh method
Pls try to provide solution to display excel filter popup without hiding [ok and cancel buttons] inside splitter pane
stackblitz sample for your reference:
thanks for your support
Hi Praveen,
Thanks for your update
Based on your query we have modified your sample and we suggest you use the below way to achieve your requirement. Please refer the below code example and sample for more information.
|
Index.html
<style> .e-splitter.e-splitter-vertical .e-pane.e-static-pane { overflow: visible; } </style> |
Screenshot:
Regards,
Rajapandi R