0

我有一个用于控制 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 网格”将根据需要正确检索数据,但随后完全冻结且无法正常工作(即使单击 Obout 网格上方的任何位置也不会发生任何事情)。下面是 UpdatePanel 中“关于网格”的示例代码。

<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>

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

4

1 回答 1

0

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

于 2013-03-01T10:19:44.560 回答