- Home
- Forum
- ASP.NET Core - EJ 2
- Filtering - Filter Menu - Excel --> Adding the custom feature to filter fields.
Filtering - Filter Menu - Excel --> Adding the custom feature to filter fields.
|
|
|
|
|
.e-xlfl-matchcasediv {
1. display: none !important;
}
|
Hi
Thanks for your quick response.
I have given below my comments on your question.
Query #1:
Before providing solution , could you please confirm whether you want to customize the text box in the search field of excel filter dialog. Please refer to the below screenshot
Answer: No.
Query #2:
By default, custom filtering fields will have the appropriate component(Date Picker, Numeric Textbox) based on the column type. In the Grid source, we will retrieve the data from value of that components, if we replace custom component(e.g numeric textbox to dropdown), then the selected value not passed to the filter query. Did you expect to override dialog with custom components in the custom filter dialog, can you please provide more information on this requirement?
Answer: No.
Could you please provide which values format to be used for below controls with example code?.
- Date Column Type Value Format
- Date Picker Column Type Value Format
- Time Picker Column Type Value Format
- Phone Number Column Type Value Format.
- Boolean Value - Checkbox Column Value Format.
- Share the screenshot where you want to place the components that you have mentioned.
- Share your requirement briefly.
- Share the ts code.
- If possible share the dataSources you are using.
- If you have enable any adaptor in your sample then provide those detail.
- If possible reproduce the issue in the attached plunker sample.
|
<ejs-grid id="Grid" dataSource=@ViewBag.DataSource allowFiltering="true" dataBound="bound" height="273">
<e-grid-filterSettings type="Menu" ></e-grid-filterSettings>
<e-grid-columns>
<e-grid-column field="OrderDate" headerText="OrderDate" format="yMd" textAlign="Right" width="100">
</e-grid-column>
. . .
</e-grid-columns>
</ejs-grid>
<script>
function bound(args) {
var dateTimePickerObj = new ej.calendars.DateTimePicker({
floatLabelType: 'Never'
});
this.columns[1].filter.ui = {
create: (args) => {
elem = document.createElement('input');
args.target.appendChild(elem);
dateTimePickerObj.appendTo(elem);
},
read: (args) => {
args.fltrObj.filterByColumn(args.column.field, args.operator, datePickerObj.value);
},
write: (args) => {
dateTimePickerObj.value = args.filteredValue;
}
}
}
</script> |
- 9 Replies
- 3 Participants
-
AA Anbazhagan Annadurai
- Mar 27, 2018 07:55 PM UTC
- Apr 18, 2018 11:04 AM UTC