# Other Languages > jQuery >  Refresh Grid

## Jigabyte

Hi,

I have an accordion with two panes. The first pane has a grid which is being used to search key columns of a table. The second pane has entry fields allowing the user to add, edit, delete etc rows. My problem is when the user goes back to the search grid all changes etc are not being shown. They have to reload the whole form.

Is there any way I can to a part post back and re-get the data?

Many Thanks,

Jiggy

----------


## sapator

Is this a gridview or an Jquery Grid? Because you posted on Jquery.

----------


## kred

I believe you should use jQuery.data together with jQuery.attr .

----------


## Lightning

Since you are not very specific about the setup ( what grid do you use, which server technologie do you use, asp.net, aspmvc, php, node.js) I can't be very helpful. You could trigger a "reload-grid" function on the change of the active accordeon item

----------


## Sherin

Hello,@JigaByte
Please try this code,To Refresh Grid


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

I hope this code will be useful for you.
Thank you.

----------

