...
To configure a Smart Grid as a drop target using JSON layouts, the following settings should be applied:
Setting | Value |
---|---|
allowDrop | true |
dropSource | the instance name of the Smart Grid that is configured as a drop source |
dataDropHandler | the name of the method, as defined within the parent Smart Form, to be called when a row is dropped |
dragHandleIconClass | the webfont CSS class name that should be used to provide the drag handle icon (for example, “fa fa-move”). Default: “k-icon k-i-hand” |
Code Block | ||
---|---|---|
| ||
{ "CustomerGrid": { "componentType": "grid", "componentOptions": { "gridLayout": "frontend://assets/customers-grid.layout.json", "dataSource": "CustomerDataSource", "objectName": "CustomerGrid", "allowDrop": true, "dropSource": "SalesRepGrid", "dataDropHandler": "handleSalesrepDrop", "dragHandleIconClass": "fa fa-move" } } } |
Using HTML Layouts
Code Block | ||
---|---|---|
| ||
<smart-grid
[smart-instance-name]="'CustomerGrid'"
[smart-data-source]="'CustomerDataSource'"
[smart-grid-layout]="'frontend://assets/customers-grid.layout.json"
[smart-grid-allow-drop]="true"
[smart-grid-drop-source]="'SalesRepGrid'"
[smart-grid-data-drop-handler]="handleSalesrepDrop"
[smart-grid-drag-handle-iconclass]="'fa fa-move'">
</smart-grid> |
Smart Grid Drop Source with a Generic Drop Target
...