0% found this document useful (0 votes)
23 views1 page

syncfusion datagrid using material ui-html

Uploaded by

p.lavanyajanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

syncfusion datagrid using material ui-html

Uploaded by

p.lavanyajanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

@model List<YourNamespace.

YourDataModel>
@{
ViewData["Title"] = "Your Page";
}

<div class="container mt-5">


<ejs-grid id="Grid" dataSource="@Model" allowPaging="true" allowSorting="true"
gridLines="Both">
<e-grid-columns>
<e-grid-column field="Column1" headerText="Header1" width="120"></e-
grid-column>
<e-grid-column field="Column2" headerText="Header2" width="120"></e-
grid-column>
</e-grid-columns>
</ejs-grid>
</div>

@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>
}

You might also like