Partial Post Back

  1. #1

    Partial Post Back

    I have implemented one grid panel with one id column
    When i click on any id row it opens up a pop-up,Now the problem is that when i close that pop-up i am calling one functions which contains _dopostback on parent page.
    Now what i want is the page should only post back the grid part and not the whole page,like the one in asp:updatepanel
    presently the whole page is post back,i want only the grid to get post back ie:all data from the grid is lost and the whole page is flicked
    Is there any mechanism in extjs controls like the one in asp:updatepanel


    Eg:
    if i do _dopostback("updatepanel1","")
    so the above method will only postpack the updatepanel1 and not the whole page

    so i want exactly the above mechanism in extjs

    Thanks
  2. #2
    Hi,

    Can you post a simplified .aspx sample demonstrating what you trying?

    The recommended technique would be using DirectEvents and/or a [DirectMethod].
    Geoffrey McGill
    Founder & CEO
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    Hi,

    Can you post a simplified .aspx sample demonstrating what you trying?

    The recommended technique would be using DirectEvents and/or a [DirectMethod].
    Thanks geoffrey.mcgill for reply

    javascript-----
      function Openpopup() {
               window.open("Default2.aspx");        }
      function callback()
    {
    __dopostback("")-----------what to write over here
    }
    
    -----------------aspx code----------------------
     <ext:Viewport ID="Viewport1" runat="server" Layout="border">
            <items>
                <ext:Panel ID="Panel2" runat="server" Layout="fit" Region="North">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" Region="North" runat="server" Flat="true">
                            <Items>
                                <ext:TextField EmptyText="Search Text Here" ID="txtBasicSearch" runat="server">
                                </ext:TextField>
                                </Items>
                        </ext:Toolbar>
                    </TopBar>
                </ext:Panel>
                <ext:Panel ID="Panel1" runat="server" Collapsible="true" Layout="accordion" Region="West"
                    Split="true" Title="Navigation" Width="250">
                    <Items>
                           <ext:TreePanel ID="trpBatches" runat="server" AutoScroll="true">
                                    <TopBar>
                                        <ext:Toolbar runat="server">
                                            <Items>
                                                <ext:ImageButton ID="btnCheckIn" runat="server" AlternateText="Accept" ToolTip="Accept"
                                                    ImageUrl="~/App_Themes/Blue/images/Icons/CheckIn.PNG" />
                                                <ext:ToolbarSpacer />
                                                <ext:ImageButton ID="btnCheckOut" runat="server" AlternateText="Complete" ToolTip="Complete"
                                                    ImageUrl="~/App_Themes/Blue/images/Icons/CheckOut.PNG" OnClientClick="CustomStatus('progressBarMyBatch');" />
                                                <ext:ToolbarSpacer />
                                                <ext:ImageButton ID="btnAutoCheckin" runat="server" AlternateText="Auto Accept Batch"
                                                    ToolTip="Auto Accept Batch" ImageUrl="~/App_Themes/Blue/images/Icons/AssignToTeam.PNG" />
                                                <ext:ToolbarFill />
                                                <ext:ImageButton ID="lnkBatchTreePrv" runat="server" Cls="button_Prev" ToolTip="Select Node and go to previous Page" />
                                                <ext:ImageButton ID="lnkBatchTreeNext" runat="server" Cls="button_Next" ToolTip="Select Node and go to Next Page" />
                                            </Items>
                                        </ext:Toolbar>
                                    </TopBar>
                             <ext:TreePanel>
                                   
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel4" runat="server" Layout="Fit" Region="Center" Title="Result">
                    <Items>
                        <ext:GridPanel ID="GridPanel1" runat="server" Layout="fit" StripeRows="true" AutoWidth="true" >
                            <Store>
                                <ext:Store ID="Store1" runat="server" AutoDecode="true" SerializationMode="Simple"
                                    AutoDataBind="true"  AutoDestroy ="true"  >
                              
                                    <Reader>
                                        <ext:JsonReader IDProperty="appID">
                                            <Fields>
                                                <ext:RecordField Name="appID" Type="Auto" />
                                            </Fields>
                                        </ext:JsonReader>
                                    </Reader>
                                 </ext:Store>
                            </Store>
                          
                            <ColumnModel ID="ColumnModel1" runat="server" AutoDataBind="true" DefaultSortable="false" >
                                <Columns>
                               <ext:Column Header="ID" Resizable="true" DataIndex="appID" >
                                        <Commands >
                                            <ext:ImageCommand CommandName ="SelectDocument" Icon="Door"  >
                                                <ToolTip Text="Review Document" />                                            
                                            </ext:ImageCommand>
                                        </Commands>                                    
                                    </ext:Column>
                              </Columns>
                            </ColumnModel>
                             <Listeners>                            
                          <Command Handler="if(command === 'SelectDocument'){ Openpopup(); }"  />
                            </Listeners>
                          </ext:GridPanel>
                    </Items>
                </ext:Panel>
               
                <ext:Panel ID="Panel5" runat="server" Collapsible="true" Layout="accordion" Region="East"
                    Split="true" Title="Work Product" Width="250">
                    <Items>
                           
                     </Items>
                  </ext:Panel>
                     </items>
        </ext:Viewport>
    The above code opens up a pop up on ImageCommand
    The popup opens and when i close that opoup i am fireing a javascript function on window.onunload(opener.callback()
    )
    As i have'nt wrote anything in __dopostback() thats y it postbacks the whole page and the page comes to its default state
    if i would be using asp controls then i would have put asp:updatepanel which contains grid,now in __dopostback("updatepanel1") so it will only postback the grid and not the whole page
    So the same mechanism i want to achive in extjs..how it is possible
    Is there any Updatepanel in extjs or any mechanism which will only post back gridpanel and not the whiole page

    Ext.net version----ext.net.community.1.0rc1

    Plz help me...m all stuck becoze of the above problem

    Thanks

Similar Threads

  1. Ext.NET Post-back event handled globally
    By Nhím Hổ Báo in forum 1.x Help
    Replies: 3
    Last Post: Dec 31, 2011, 7:32 AM
  2. Store does not retain value after post back
    By pooja in forum 1.x Help
    Replies: 1
    Last Post: Oct 15, 2010, 7:14 PM
  3. [CLOSED] Post back issues
    By Etisbew in forum 1.x Premium Help
    Replies: 11
    Last Post: Jun 24, 2009, 10:06 AM
  4. [CLOSED] Post Back issues ????
    By dukefama in forum 1.x Help
    Replies: 2
    Last Post: Oct 08, 2008, 2:52 PM
  5. Replies: 7
    Last Post: Jun 09, 2008, 8:45 PM

Posting Permissions