BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Good morning, I'll explain the problem if the title isn't clear.
When I enter edit mode in a grid, I would like to be able to update the datasource of a dropdown field (in this specific case, add another data, therefore a fast entry operation), without exiting edit mode and without having to refresh the grid itself. Is it possible?
I await your responses.
editTemplate
. In the open
event of the dropdown, you can dynamically add the item using the addItem
method of the DropDown.Code Example : [app.component.html] <e-column field="CustomerID" headerText="Customer ID" width="180"> <ng-template #editTemplate let-data> <ejs-dropdownlist #dropDown [dataSource]="updatedDataSource" [(value)]="orderData.CustomerID" (open)="open($event)" ></ejs-dropdownlist> </ng-template> </e-column> [app.component.ts] open(args) { if (this.dropDown && !this.isOpen) { this.isOpen = true; const newItem = 'Added New Item'; this.dropDown.addItem(newItem); } } actionBegin(args) { if (args.requestType === 'beginEdit' || args.requestType === 'add') { this.orderData = Object.assign({}, args.rowData); this.isOpen = false; } if (args.requestType === 'save') { (args.data as any)['CustomerID'] = this.orderData['CustomerID']; } } |
DropDownList
component in the edit form. This feature allows you to define a specific set of values for the DropDownList.query
property allows you to define custom queries for data retrieval and filtering.
|
I think my question needs clarification.
I would like that while in edit mode of the grid, I can add a custom value to the dropdown datasource via API, without exiting edit mode and without refreshing the grid itself.
In the first example, the added value is done statically, and furthermore, the value is added while opening the dropdown. In my case, the value should be added by pressing an add button in a custom dropdown template, which provides a modal that add the value via API.
Could you please help me with this task?
I think my question needs clarification.
I would like that while in edit mode of the grid, I can add a custom value to the dropdown datasource via API, without exiting edit mode and without refreshing the grid itself.
In the first example, the added value is done statically, and furthermore, the value is added while opening the dropdown. In my case, the value should be added by pressing an add button in a custom dropdown template, which provides a modal that add the value via API.
Could you please help me with this task?