Apr 29, 2011, 8:05 PM
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.
Thank in advance !!
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.