Professional Web Applications Themes

How do i refresh a datagrid from a popup window without re opening the page... - ASP.NET Data Grid Control

Hi, does any one know how to refresh a datagrid on one page from another page without having to load the whole page again Let me explain Ive got a page with 4 tabs on it with different datagrids in each tab..I have a add button on one page that open a new pop up window which allows the user to add a new resource to the datagrid...Once the user has selected a resource to add to the datagrid , i want the page to send an event to the Main datagrid page to refresh the data grid to show ...

  1. #1

    Default How do i refresh a datagrid from a popup window without re opening the page...

    Hi, does any one know how to refresh a datagrid on one page from another page without having to load the whole page again

    Let me explain

    Ive got a page with 4 tabs on it with different datagrids in each tab..I have a add button on one page that open a new pop up window which allows the user to add a new resource to the datagrid...Once the user has selected a resource to add to the datagrid , i want the page to send an event to the Main datagrid page to refresh the data grid to show the new added record... I dont want to have to use window.opener to re open the whole window because the whole page refreshing is too slow..

    Any ideas
    Thank
    Paul
    pkenty Guest

  2. #2

    Default Re: How do i refresh a datagrid from a popup window without re opening the page...

    Hi,

    your question peeked my interest...
    I spend couple hour to figure it out but I guess I fond the solution...
    below is the HTML code and Javascript:
    ====================================
    <html>
    <head>
    <script language="javascript">
    function addRow(strCol1, strCol2, strCol3, strCol4, strCol5, strCol6)
    {
    var MainTbl = doent.getElementById("tblTestID");
    var rowcopy = MainTbl.rows[MainTbl.rows.length-1].cloneNode(true);
    MainTbl.rows[MainTbl.rows.length-1].cells[0].innerHTML = strCol1;
    MainTbl.rows[MainTbl.rows.length-1].cells[1].innerHTML = strCol2;
    MainTbl.rows[MainTbl.rows.length-1].cells[2].innerHTML = strCol3;
    MainTbl.rows[MainTbl.rows.length-1].cells[3].innerHTML = strCol4;
    MainTbl.rows[MainTbl.rows.length-1].cells[4].innerHTML = strCol5;
    MainTbl.rows[MainTbl.rows.length-1].cells[5].innerHTML = strCol6;
    MainTbl.rows[MainTbl.rows.length-2].appendChild(rowcopy);
    }
    </script>
    </head>
    <body>
    <DIV id="DivMain">
    <table id="tblTestID" width="600" cellspacing="0" cellpadding="0"
    border="1">
    <tr>
    <td>Row 1 Col 1</td>
    <td>Row 1 Col 2</td>
    <td>Row 1 Col 3</td>
    <td>Row 1 Col 4</td>
    <td>Row 1 Col 5</td>
    <td>Row 1 Col 6</td>
    </tr>
    <tr>
    <td>Row 2 Col 1</td>
    <td>Row 2 Col 2</td>
    <td>Row 2 Col 3</td>
    <td>Row 2 Col 4</td>
    <td>Row 2 Col 5</td>
    <td>Row 2 Col 6</td>
    </tr>
    <tr>
    <td>Row 3 Col 1</td>
    <td>Row 3 Col 2</td>
    <td>Row 3 Col 3</td>
    <td>Row 3 Col 4</td>
    <td>Row 3 Col 5</td>
    <td>Row 3 Col 6</td>
    </tr>
    </table>
    </DIV>
    <BR>
    <BR>
    <a href="javascript:addRow('Row 4 Coll 1','Row 4 Coll 2','Row 4 Coll
    3','Row 4 Coll 4','Row 4 Coll 5','Row 4 Coll 6');">addRow</a>
    </body>
    </html>
    =====================================
    just call addRow function from your popUp window before your close it and
    pass the valuues for it..

    ----------------
    Kilic Beg

    "pkenty" <anonymousdiscussions.microsoft.com> wrote in message
    news:DF377D49-B36B-47A1-9163-B4C7D92C95BCmicrosoft.com...
    > Hi, does any one know how to refresh a datagrid on one page from another
    page without having to load the whole page again?
    >
    > Let me explain.
    >
    > Ive got a page with 4 tabs on it with different datagrids in each tab..I
    have a add button on one page that open a new pop up window which allows the
    user to add a new resource to the datagrid...Once the user has selected a
    resource to add to the datagrid , i want the page to send an event to the
    Main datagrid page to refresh the data grid to show the new added record...
    I dont want to have to use window.opener to re open the whole window because
    the whole page refreshing is too slow...
    >
    > Any ideas?
    > Thanks
    > Paul

    Kilic Beg Guest

Similar Threads

  1. Opening popup window in flash
    By FlashAsh99 in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: February 10th, 04:25 PM
  2. meta refresh - opening to set window size
    By mikebikel webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 4
    Last Post: November 7th, 05:43 PM
  3. Opening popup window
    By Linda Rathgeber in forum Macromedia Fireworks
    Replies: 8
    Last Post: September 6th, 02:27 AM
  4. popup window refresh--Massimo help?
    By Liz Willner in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 22nd, 12:50 AM
  5. how to refresh page after date selection from popup calendar?
    By [ MVP ] Sukesh Ashok Kumar in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: July 12th, 08:37 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139