Hello,
we are facing a issue using the Grid control inside splitter: the filtering menu is partially hidden when the split pane containing the Grid is lower than the filter popup height (as shown in the following screenshot, I have also attached a sample application).
Is there a way to append the filter menu outside the pane (i.e. the body tag) or another way to avoid this behavior?
Thanks in advance.
Best Regards.
Paolo
|
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();
// document body is set as the filter dialog target
args.filterModel.dialogObj.target = document.getElementsByTagName("BODY")[0];
// 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();
}
|
|
Index.html
<style>
.e-checkboxfilter .e-ftrchk,
.e-checkboxfilter .e-searchbox {
padding-left: 9px !important;
}
.e-ftrchk {
padding-bottom: 9px !important;
padding-top: 9px !important;
}
.e-dialog.e-checkboxfilter {
min-height: 322px !important;
}
.e-checkboxfilter .e-dlg-content {
padding-left: 9px !important;
}
.e-dialog.e-checkboxfilter {
min-width: 250px !important;
}
.e-checkboxfilter .e-searchbox {
display: block !important;
}
.e-checkboxfilter .e-searchclear {
float: right;
position: relative;
}
.e-checkboxfilter .e-checkboxlist {
height: 200px;
margin-top: 5px;
min-height: 160px;
overflow-y: auto;
}
.e-checkboxfilter .e-chk-hidden {
-moz-appearance: none;
height: 1px;
opacity: 0;
width: 1px;
}
.e-checkboxfiltertext {
width: 150px;
word-break: normal;
}
</style>
|
Hi Rajapandi Ravi,
your solutions worked like a charm!
Thank you for your support.
Best Regards.
Paolo
Hello,
going to reopen this support request because our client asked us to have the Excel-like filtering and changing the menu type to Excel doesn't work.
Excel like filter works without the piece of code to move the filter to the body but breaks with the code
We tried also to update syncfusion packages to the latest release but the problem is still there. Any solution to have it working with the Excel filter?
Best regards.
Paolo
Hello,
nothing new about the behavior described above using Excel filters?
Paolo,
Based on your query we have modified your shared sample and we have updated the sample to the latest version package version. So 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> #firstgrid .e-filter-popup {
position: fixed !important;
z-index: 100002 !important;
} </style>
|
|
app.component.html
<ejs-grid id='firstgrid' #grid [dataSource]="data" (actionComplete)="actionComplete($event)" [filterSettings]="defaultFilterSettings" allowFiltering="true" height="100%"> <e-columns> <e-column field="OrderID" headerText="Order ID" textAlign="Right" width=90></e-column> <e-column field="CustomerID" headerText="Customer ID" width=120></e-column> <e-column field="Freight" headerText="Freight" textAlign="Right" format="C2" width=90></e-column> <e-column field="OrderDate" headerText="Order Date" textAlign="Right" format="yMd" width=120></e-column> </e-columns> </ejs-grid>
app.component.ts
actionComplete(args: any) { if (args.requestType === "filterafteropen") { this.grid.resetFilterDlgPosition(args.columnName); //pass the column name here } } |
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/sample396672587.zip
Hello Rajapandi Ravi,
the example works as we expect but for unknown reasons is not working in our app, we're trying to figure out what's wrong and the differences between the two apps.
Thank you again, we appreciate your support!
Best regards.
Paolo
Paolo,
Please validate at your end for the issue and get back to us if further assistance needed.