Results 1 to 5 of 5

Thread: Refresh Grid

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Refresh Grid

    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

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,765

    Re: Refresh Grid

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

  3. #3
    New Member
    Join Date
    Mar 2014
    Posts
    9

    Re: Refresh Grid

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

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Refresh Grid

    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
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  5. #5
    Member
    Join Date
    Jul 2019
    Location
    Ahmedabad
    Posts
    46

    Re: Refresh Grid

    Hello,@JigaByte
    Please try this code,To Refresh Grid
    Code:
        <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.
    < advertising removed by moderator >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width