Jul 30, 2010, 7:21 AM
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:
The event that's being called comes here:
I've managed to replicate it into two instances in my code:
- The exception occurs when GridPanel.DataBind() on a child user control is called from a parent user control
- 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.