Hi prasad
Greetings from Syncfusion support
Based on your query you want to display the grid data by using ajax request in the razor page. For your requirement we have prepared a sample by binding the data to the grid by the ajax request in the grid “created” event. Please refer the below code example and sample for your reference
Code Example :
<ejs-grid id="Grid" allowPaging="true" toolbar="@( new List<object>() {"Add","Edit","Delete","Update","Cancel"})" created="create()">
………………
</ejs-grid>
<script>
function create() {
var ajax = new ej.base.Ajax("/Index?handler=ClickHandle", 'GET');
ajax.send();
ajax.onSuccess = function (data) {
var grid = document.getElementById('Grid').ej2_instances[0]; // Grid instance
grid.dataSource = ej.data.DataUtil.parse.parseJson(data);
}
}
</script> |
Please let us know if you have any concerns.
Regards,
Vignesh Sivagnanam