...
export class AppComponent {
...
public orderData: Object[];
...
actionBegin(args: any) {
if (args.requestType === 'beginEdit' || args.requestType === 'add') {
this.orderData = Object.assign({}, args.rowData);
}
if (args.requestType === 'save') {
// cast string to integer value.
args.data['OrderDate'] = this.orderData['OrderDate'];
args.data['ShippedDate'] = this.orderData['ShippedDate'];
}
}
}
|
<div class="control-section">
<div class="col-lg-9">
<ejs-grid #normalgrid id='Normalgrid' [dataSource]='data' allowPaging='true'
[pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar' (actionBegin)='actionBegin($event)'>
<e-columns>
...
<ng-template #editTemplate let-data>
<ejs-timepicker id="OrderDate" placeholder="Start Date"
[(ngModel)]="orderData.OrderDate" floatLabelType='Never'></ejs-timepicker>
</ng-template>
</e-column>
<e-column field='ShippedDate' headerText='Shipped Date' width='120' [format]='formatoptions' textAlign='Right'>
<ng-template #editTemplate let-data>
<ejs-timepicker id="ShippedDate" placeholder="Start Date"
[(ngModel)]="orderData.ShippedDate" floatLabelType='Never'></ejs-timepicker>
</ng-template>
</e-column>
</e-columns>
</ejs-grid>
</div>
|
...
export class AppComponent {
...
public orderData: Object[];
...
actionBegin(args: any) {
if (args.requestType === 'beginEdit' || args.requestType === 'add') {
this.orderData = Object.assign({}, args.rowData);
}
...
}
}
|
Is it possible filter based on input in time picker
Hi Sivasakthi Nithyanantham,
Upon reviewing your query, we have identified the need to filter values in the Syncfusion Grid based on the input from the TimePicker component. To proceed with an appropriate solution, we require additional information from you. Kindly provide the following details:
1. Specify the type of filtering you are employing in the Grid (Filter-Type).
2. Share the column definition of the Grid for which the TimePicker component needs to be rendered, along with the complete Grid rendering code and any event handler functions utilized.
3. Indicate the current version of the Syncfusion package you are using.
By default, the Syncfusion Grid renders the filter UI for a column based on its type. For example, in the sample provided below, we used a Menu filter where a DateTimePicker component is rendered for a dateTime type column. Please review the sample and explain your specific requirements in detail. This will greatly assist us in delivering an optimal solution.
Sample: Dkfgrf (forked) - StackBlitz
Regards
Aishwarya R