We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to refresh the Grid after record changes on client-side?

Platform: jQuery |
Control: ejGrid
Tags: editing, ejgrid


Adding or removing a record from client-side and refreshing the changes in the Grid content.


The Grid records can be manually added from the client-side by using the model.dataSource.push function and you can also remove a record by using the model.dataSource.splice function. After adding or removing a record from the Grid data source, the Grid can be refreshed using the refreshContent function.


    <button id="Add">Add</button>&nbsp;
    <button id="Remove">Remove</button><br />
    <div id="Grid"></div>
    <script type="text/javascript">        
            type: "button",
            click: function (args) {
                var gridObj = $("#Grid").ejGrid("instance");
                var data = { OrderID: 10247, CustomerID: "ASDFG", EmployeeID: 4 };
            type: "button",
            click: function (args) {
                var gridObj = $("#Grid").ejGrid("instance");
                var selectedRow = gridObj.selectedRowsIndexes[0];
                if (selectedRow != undefined)
                    gridObj.model.dataSource.splice(selectedRow, 1);
                    alert("No records selected for delete operation");


Adding Record

Figure 1: After adding a record


Remove Record

Figure 2: After removing a record

You must log in to leave a comment
Victor Flamenco
Dec 02, 2015
Worked perfectly for me. Thanks. Reply
Marcelo Blank
Aug 27, 2017


Mani Sankar Durai [Syncfusion]
Aug 28, 2017

     Hi Marcelo,


      We cannot understand your comment. Please raise a query if you need any further assistance related to this Knowledge Base document.



Manisankar Durai.

Habeebin Ali
Apr 25, 2018



Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile