Oct 22, 2009, 2:18 PM
UpdatePanel bug
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<table id="Table2" style="background-image: url(../images/background2.bmp)" cellspacing="0"
cellpadding="3" width="100%" align="left" border="0">
<tr>
<td align="right">
<asp:Label ID="Label2" runat="server" CssClass="tabela"> Identificação Beneficiário:</asp:Label>
</td>
<td>
<ext:ComboBox ID="txtIdentificacao" runat="server" StoreID="Store2" DisplayField="Identificacao"
ValueField="Nome" TypeAhead="false" LoadingText="Pesquisando..." Width="350"
PageSize="8" HideTrigger="true" ItemSelector="div.search-item" MinChars="1" AutoPostBack="true"
OnItemSelected="txtIdentificacao_Selected" ForceSelection="false" >
<Template runat="server">
<tpl for=".">
<div class="search-item">
<h3>{Nome}</h3>
{Identificacao}
</tpl>
</Template>
</ext:ComboBox>
</td>
</tr>
<tr>
<td align="right" style="margin-top: 8px">
<asp:Label ID="lblCNPGCPF" runat="server" CssClass="tabela"> Nome Beneficiário:</asp:Label>
</td>
<td>
<ext:ComboBox ID="txtNomeBeneficiario" runat="server" StoreID="Store1" DisplayField="Nome"
ValueField="Identidade" TypeAhead="false" LoadingText="Pesquisando..." Width="350"
PageSize="8" HideTrigger="true" ItemSelector="div.search-item" MinChars="1" AutoPostBack="true"
OnItemSelected="txtNomeBeneficiario_Selected" ForceSelection="false" >
<Template runat="server">
<tpl for=".">
<div class="search-item">
<h3>{Nome}</h3>
{Identidade}
</tpl>
</Template>
</ext:ComboBox>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
public void txtIdentificacao_Selected(Object sender, EventArgs e)
{
txtNomeBeneficiario.SelectedItem.Text = txtIdentificacao.SelectedItem.Value;
//UpdatePanel3.Update();
ScriptManager2.AddUpdatePanelToRefresh(UpdatePanel3);
// ScriptManager1.SetFocus(txtNomeBeneficiario);
}
public void txtNomeBeneficiario_Selected(Object sender, EventArgs e)
{
txtIdentificacao.SelectedItem.Value = txtNomeBeneficiario.SelectedItem.Value;
//UpdatePanel3.Update();
ScriptManager2.AddUpdatePanelToRefresh(UpdatePanel3);
// ScriptManager1.SetFocus(txtNomeBeneficiario);
}
Here is my bug:1. I use the autocomplete from txtIdentificacao and it updates txtNomeBeneficiario
2. I use the autocomplete from txtNomeBeneficiario and it updates txtIdentificacao
3. I use the autocomplete from txtIdentificacao and it does NOT update txtNomeBeneficiario
Please, help me out.
Thanks