syncfusion datagrid using material ui-html
syncfusion datagrid using material ui-html
YourDataModel>
@{
ViewData["Title"] = "Your Page";
}
@section Scripts {
<script src="https://cdn.syncfusion.com/ej2/19.2.57/dist/ej2.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"
></script>
<script>
$(function () {
$('#Grid').ejGrid({
dataSource: '@Html.Raw(Json.Serialize(Model))',
allowPaging: true,
allowSorting: true,
gridLines: 'Both',
columns: [
{ field: 'Column1', headerText: 'Header1', width: 120 },
{ field: 'Column2', headerText: 'Header2', width: 120 }
]
});
});
</script>
}