UpdatePanel bug

  1. #1

    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
  2. #2

    RE: UpdatePanel bug



    Here is how i solved it:

            public void txtIdentificacao_Selected(Object sender, EventArgs e)
            {
                txtNomeBeneficiario.SelectedItem.Text = txtIdentificacao.SelectedItem.Value;
                txtNomeBeneficiario.SelectedItem.Value = txtIdentificacao.SelectedItem.Value;
            }
    
    
            public void txtNomeBeneficiario_Selected(Object sender, EventArgs e)
            {
                txtIdentificacao.SelectedItem.Text = txtNomeBeneficiario.SelectedItem.Value;
                txtIdentificacao.SelectedItem.Value = txtNomeBeneficiario.SelectedItem.Value;
            }

Similar Threads

  1. UpdatePanel in ext:Panel
    By rach in forum 1.x Help
    Replies: 2
    Last Post: Apr 23, 2012, 6:40 AM
  2. UpdatePanel
    By Timothy in forum Open Discussions
    Replies: 20
    Last Post: Feb 11, 2010, 10:23 AM
  3. UpdatePanel
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Mar 03, 2009, 8:48 AM
  4. UpdatePanel with Coolite 0.6
    By tas in forum 1.x Help
    Replies: 3
    Last Post: Dec 16, 2008, 7:43 PM
  5. UpdatePanel and FitLayout
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 06, 2008, 7:42 PM

Posting Permissions