Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141515 | Dec 14,2018 04:29 PM UTC | Apr 15,2019 11:17 AM UTC | ASP.NET Core - EJ 2 | 3 |
![]() |
Tags: DataGrid |
<ejs-grid id="Grid" dataSource="ViewBag.datasource" height="315" allowPaging="true">
<e-grid-columns>
...
<e-grid-column field="tags" edit="@(new {create = " create ", read = "read ", write = "write "})" width="120"></e-grid-column>
....
</e-grid-columns>
</ejs-grid>
<script>
function create(args) {
elem = document.createElement('input');
return elem;
}
function write(args) {
multiselect = new ej.dropdowns.MultiSelect({
dataSource: ['JavaScript', 'ASP.NET MVC', 'Vue', 'Angular', 'React', 'ASP.NET Core'],
placeholder: "Select Tags",
value: args.rowData[args.column.field] ? args.rowData[args.column.field].split(',') : null,
mode: 'CheckBox'
});
multiselect.appendTo(elem);
}
function read(args) {
return multiselect.value.join(',')
}
</script>
|
Hi R Brian Lindahl,
Thanks for contacting Syncfusion support.
We have created a sample to use MultiSelect as cell editor using the Edit property of the columns and the same can be downloaded from the below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/grid-multiselect-1362298823
<ejs-grid id="Grid" dataSource="ViewBag.datasource" height="315" allowPaging="true"><e-grid-columns>...<e-grid-column field="tags" edit="@(new {create = " create ", read = "read ", write = "write "})" width="120"></e-grid-column>....</e-grid-columns></ejs-grid><script>function create(args) {elem = document.createElement('input');return elem;}function write(args) {multiselect = new ej.dropdowns.MultiSelect({dataSource: ['JavaScript', 'ASP.NET MVC', 'Vue', 'Angular', 'React', 'ASP.NET Core'],placeholder: "Select Tags",value: args.rowData[args.column.field] ? args.rowData[args.column.field].split(',') : null,mode: 'CheckBox'});multiselect.appendTo(elem);}function read(args) {return multiselect.value.join(',')}</script>
Please refer to the below help links for more information.
Regards,Madhu Sudhanan P
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.