Values lost after update content of a FormPanel.

  1. #1

    Values lost after update content of a FormPanel.

    Hi guys,

    I am with problems in my application.

    The values ​​are being lost when updating a component multiselec.
    The values are in memory.
    I have to put in the session?

    My code that fills my multiselect.

    private void preencheMultiSelectTipoDocumento()
            {
                int contador = this.objGrupoDocumento.tiposDocumentos.Count;
                if (contador != 0)
                {
                    foreach (var tiposDocumento in this.objGrupoDocumento.tiposDocumentos)
                    {
                        MultiSelectTipoDocumentoID.Items.Add(new Ext.Net.ListItem { Text = tiposDocumento.indice.nome, Value = tiposDocumento.indice.id.ToString() });
                    }
                    this.FormPnlRecuperarDocumentoId.UpdateContent();          
                }
                
            }
    My click event multiselect.
    <ext:MultiSelect ID="MultiSelectTipoDocumentoID" 
                                                        runat="server" 
                                                        MultiSelect="false" 
                                                        Width="260" 
                                                        X="10" Y="72"> 
                                                        <DirectEvents>
                                                            <Click OnEvent ="CriarTextBoxIndices">
                                                            </Click>                                                        
                                                        </DirectEvents>      
                                                    </ext:MultiSelect>
    code with error. My list (indices) that is empty after updatecontent below.
     protected void CriarTextBoxIndices( object sender, DirectEventArgs e)
            {                       
                int contador = indices.Count;
                if (MultiSelectTipoDocumentoID.SelectedItems[0].Value != string.Empty && contador != 0)
                {
                    int X = 10;
                    int Y = 270;
                    int Width = 260;
    
                    foreach (var item in indices)
                    {
                        Ext.Net.Label lblIndice = new Ext.Net.Label();
                        lblIndice.ID = "lblIndice" + item.id.ToString();
                        lblIndice.Text = item.nome + ": ";
                        lblIndice.X = X;
                        lblIndice.Y = Y + 50;
                        //lblIndice.LabelAlign = LabelAlign.Left;
    
    
                        Ext.Net.TextField textField = new Ext.Net.TextField();
                        textField.ID = "txtIndice" + item.id.ToString();
                        textField.X = X;
                        textField.Y = Y + 50;
                        textField.Width = Width;
    
                        this.FormPnlRecuperarDocumentoId.Add(lblIndice);
                        this.FormPnlRecuperarDocumentoId.Add(textField);
                    }
                    this.FormPnlRecuperarDocumentoId.UpdateContent();
                   
                } 
            }
    Any suggestions?

    Thank in advance !!
    Last edited by luiz; Apr 29, 2011 at 8:15 PM.

Similar Threads

  1. Replies: 2
    Last Post: Oct 11, 2011, 1:15 PM
  2. content lost when closing a tab TabPanel
    By danilo in forum 1.x Help
    Replies: 2
    Last Post: Jul 11, 2011, 11:49 AM
  3. [CLOSED] Buttons in FormPanel Content
    By voipswitch in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Oct 29, 2010, 12:12 PM
  4. [CLOSED] GridPanel with dynamic columns lost values after reload data
    By asztern in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 21, 2010, 9:22 AM
  5. Replies: 0
    Last Post: Oct 19, 2010, 7:39 AM

Tags for this Thread

Posting Permissions