dear all,
i'm creating simple form with one EJ2 grid on it. and I use edit mode dialog for CRUD .
my question is, how to layout the dialog edit form? the default is the form only single column. i want to layout the form into two columns.
note:
screenshots attached
Views:
@{
ViewData["Title"] = "List";
}
<h2>List</h2>
<div class="control-section">
<div class="content-wrapper">
<div id="Grid">
</div>
</div>
</div>
@section Scripts{
<script>
ej.base.enableRipple(true)
var data = new ej.data.DataManager({
url: '/api/todo',
updateUrl: '/api/todo',
removeUrl: '/api/todo',
insertUrl: '/api/todo',
adaptor: new ej.data.WebApiAdaptor()
});
var grid = new ej.grids.Grid({
dataSource: data,
editSettings: {
allowEditing: true,
allowAdding: true,
allowDeleting: true,
mode: 'Dialog',
showConfirmDialog: true,
showDeleteConfirmDialog: true,
},
allowPaging: true,
toolbar: ['Add', 'Edit', 'Delete'],
height: 500,
columns: [
{ field: 'todoId', isPrimaryKey: true, visible: false, headerText: 'ID', textAlign: 'Right', width: 120, type: 'number' },
{ field: 'todoName', validationRules: { required: true }, headerText: 'Todo Name', width: 150 },
{ field: 'todoDescription', headerText: 'Todo Description', width: 150 }
]
});
grid.appendTo('#Grid');
</script>
}
Attachment:
dialoglayout_ce4c45a8.zip