HttpException on GridPanel.RefreshView()

  1. #1

    HttpException on GridPanel.DataBind() and GridPanel.RefreshView()

    I keep getting an HttpException: "Request is not available in this context" on GridPanel.RefreshView().

    I've managed to replicate it into two instances in my code:
    1. The exception occurs when GridPanel.DataBind() on a child user control is called from a parent user control
    2. The exception doesn't occur on the first time, but occurs on the second, third and so forth time that I call it from a DirectEvent.


    The event that's being called comes here:
                    <ext:Panel ID="uploadPanel" runat="server" Width="425" Padding="5" Layout="Form"
                        Border="false" ButtonAlign="Right" Header="false" Frame="false">
                        <Content>
                            <div class="FormHeader">
                                Select files to upload
                            </div>
                        </Content>
                        <Items>
                            <ext:FileUploadField ID="asnFileUpload" Width="300" FieldLabel="ASN" runat="server">
                            </ext:FileUploadField>
                            <ext:FileUploadField ID="componentDataFileUpload" Width="300" FieldLabel="Component Data"
                                runat="server">
                            </ext:FileUploadField>
                        </Items>
                        <Buttons>
                            <ext:Button ID="submitButton" runat="server" Text="Submit">
                                <DirectEvents>
                                    <Click OnEvent="Button_Click" IsUpload="true">
                                        <EventMask ShowMask="true" />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                        </Buttons>
                    </ext:Panel>
    The code behind:
     protected void Button_Click( object sender, DirectEventArgs e )
            {
                ASNUploadPresenter.UploadASN();
            }
    UploadASN has some code that does not call any UI related methods aside from:

            public List<REMEC.ASNUploadDataAccess.Models.Module> ErrorItems
            {
                set
                {
                    errorStore.DataSource = value;
                    errorStore.DataBind();
    
                    errorGridPanel.RefreshView();
                }
            }
    The preceding function works the first time and produces the HttpException on the second, third and so forth clicks.
    Last edited by Nojj02; Jul 30, 2010 at 7:58 AM.
  2. #2
    Hi,

    - Call DataBind for a grid is not required (need call DataBind for the Store only)
    - why do you refresh the view? Grid refresh the view automatically after new data binding

    Please provide full test sample which reproduces that exception
  3. #3
    Thanks you for the reply. I didn't know that. Do you mean that whenever I call DataBind on the store the grid gets updated?

    Oh I meant, I was calling the store.DataBind(). I will try to reproduce it using a smaller snippet of code (as the one I'm using it for is very complex) and will post back once I do so.

Similar Threads

  1. Replies: 4
    Last Post: Feb 16, 2012, 6:06 PM
  2. Replies: 4
    Last Post: Feb 06, 2012, 8:51 AM
  3. [CLOSED] Mask throwing HttpException
    By fordprefect in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 14, 2011, 9:11 PM

Posting Permissions