Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146207 | Jul 25,2019 03:34 PM UTC | Jul 26,2019 11:36 AM UTC | JavaScript - EJ 2 | 1 |
![]() |
Tags: TreeGrid |
……………..
let grid: TreeGrid = new TreeGrid(
{
dataSource: sampleData,
childMapping: 'subtasks',
treeColumnIndex: 1,
height: 400,
………………………
columns: [
{
field: 'taskID', headerText: 'Task ID', isPrimaryKey: true, textAlign: 'Right',
validationRules: { required: true, number: true }, width: 80
},
{ field: 'taskName', headerText: 'Task Name', edit:
{
create: function() {
elem = document.createElement("input");
return elem;
},
read: () => {
return multiSelectObj.value;
},
destroy: () => {
multiSelectObj.destroy();
},
write: args => {
multiSelectObj = new MultiSelect({
dataSource: <{key: string, value: any}[]>grid.grid.dataSource,
fields: { value: 'taskName' },
value: Array.isArray(args.rowData["taskName"])? args.rowData["taskName"] : [args.rowData["taskName"]],
});
multiSelectObj.appendTo(elem);
}
},
width: 200 },
{
field: 'priority', headerText: 'Priority', width: 90,
}
]
});
grid.appendTo('#Grid');
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.