异步回发后,Obout Grid在UpdatePanel内部不起作用

时间:2013-02-21 10:01:02

标签: grid updatepanel obout asynchronous-postback

我有一个用于控制Obout网格数据源的下拉列表。

<obout:OboutDropDownList runat="server" ID="ddlAAACode"
   DataTextField="Description" DataValueField="AAACode" 
   FolderStyle="~/AppThemes/intstyles/premiere_blue/OboutDropDownList" 
   Width="250" Enabled="true" 
   AutoPostBack="true" 
   OnSelectedIndexChanged="ddlAAACode_SelectedIndexChanged" />

“ddlAAACode_SelectedIndexChanged”代码

protected void ddlAAACode_SelectedIndexChanged(object sender, EventArgs e)
{
    string AAACode = ddlAAACode.SelectedValue;

    .....getting business object & entity.....

    try
    {
        DataTable dt = obj.GetObject(AAACode);

        if (dt != null)
        {
            if (dt.Rows.Count > 0)
            {
                grid1.DataSource = dt;
                grid1.DataBind();
            }

            dt = null;
        }
    }
    catch (ApplicationException ex)
    {
        throw new ApplicationException(ex.Message);
    }
    finally
    {
    }
}

从下拉列表中选择一个项目后,“Obout grid”将根据需要正确检索数据,但随后完全冻结并且无法正常工作(甚至点击Obout网格上方的任何位置都没有发生)。下面是UpdatePanel中“Obout grid”的示例代码。

<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional"> 
    <ContentTemplate>
        <obout:Grid id="grid1" runat="server" CallbackMode="true" AllowPageSizeSelection="false" Serialize="false" 
            AutoGenerateColumns="false" FolderStyle="~/App_Themes/grdstyles/style_12" AllowFiltering="true" 
            AllowAddingRecords="false">
            <Columns>
                <obout:Column ID="Column1" DataField="AAACode" Width="100" HeaderText="AAA Code" runat="server">
                    <FilterOptions>
                        <obout:FilterOption Type="NoFilter" />
                        <obout:FilterOption Type="Contains" />
                        <obout:FilterOption Type="DoesNotContain" />
                        <obout:FilterOption Type="StartsWith" />
                        <obout:FilterOption Type="EndsWith" />
                    </FilterOptions>
                </obout:Column>
    <ContentTemplate>
........
........
........
<Triggers>
            <asp:AsyncPostBackTrigger ControlID="ddlGroupCode"/>
    </Triggers>
</asp:UpdatePanel>

任何评论都非常感谢....帮助我...... :)

1 个答案:

答案 0 :(得分:0)

我认为您必须在标准UpdatePanel控件的位置使用免费的Obout AJAX页面控件