事件没有使用Asp UpdatePanel触发

时间:2017-11-21 12:28:07

标签: c# asp.net devexpress updatepanel scriptmanager

我有一个AspxDateEdit控件,应该调用一个方法来更新AspxTextbox。这两个控件插入UpdatePanel内,但AspxDateEdit控件事件不会触发。我在页面上注册了ScriptManager,没有出现错误消息。有什么问题?

ASPX代码

<asp:UpdatePanel ID="upControleDataNumeroDocumento" UpdateMode="Always" ChildrenAsTriggers="true" runat="server">
    <ContentTemplate>
        <div class="row">
            <div class="form-group">
                <div class="col-md-3">
                    <label>Data:</label>
                    <dx:ASPxDateEdit ID="deDataLancamento" ClientInstanceName="deDataLancamento" runat="server" Theme="Sindiplus" Width="100%" OnDateChanged="deDataLancamento_DateChanged" 
                        CalendarProperties-TodayButtonText="Hoje" AutoPostBack="true">
                        <ValidationSettings SetFocusOnError="true" ErrorDisplayMode="ImageWithTooltip">
                            <RequiredField IsRequired="True" />
                        </ValidationSettings>                            
                    </dx:ASPxDateEdit>
                </div>
                <div class="col-md-3">
                    <label>Numero do Documento:</label>
                    <dx:ASPxTextBox ID="tbNumeroDocumento" ClientInstanceName="tbNumeroDocumento" runat="server" Enabled="false" Theme="Sindiplus" Width="50%" ClientEnabled="false">
                    </dx:ASPxTextBox>
                </div>
            </div>
        </div>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="deDataLancamento" EventName="DateChanged" />
    </Triggers>
</asp:UpdatePanel>

CS Envent Code

protected void deDataLancamento_DateChanged(object sender, EventArgs e)
{
    DataBindNumeroDocumento();
}  

修改

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>

0 个答案:

没有答案