[CLOSED] [1.0] Problem with Multifield.Fields.Remove component

  1. #1

    [CLOSED] [1.0] Problem with Multifield.Fields.Remove component



    Hi,
    I create runtime a panel "pnlfiltro_campo" and inside it a multfield "multif_campo"; I add two fields: an ext.net.textfield and an ext.net.button.

    The problem is on RemovePanel ("pnlfiltro_campo") 's function.

    I run my page and my panel ("pnlfiltro_campo") is displayed correctly but when I click on "remove panel"'s button after few minutes appears a msg "Do you want to interrupt script? Internet explorer is slowed down by one of the script of the page; computer could not respond". If I confirm stopping script in my panel "pnlfiltro_campo" disappear textfield component but not button component, so I think that the problem is when page try to remove button...

    The same problem occours if in multifield I add an ext.net.datafield instead of ext.net.button component.

    Differently, if in multifield I add an ext.net.combobox instead of ext.net.button component, it works perfectly!!

    Here the code:
    
    Public Sub CreatePanel() 
        Dim Filtro As New Panel    
        Filtro.ID = "PANELFILTRO_CAMPO"
        Filtro.EnableViewState = "false"    
        Filtro.Header = False
        Filtro.Icon = Icon.BulletCross
        Filtro.Draggable = True
        Filtro.AutoWidth = False
        Filtro.AutoHeight = False
    
        Dim Pnl As Panel = AddCampo()
        Pnl.ID = "PNLFILTRO_CAMPO"
        Filtro.Items.Add(Pnl)
    
        'FiltriColonna is defined in markup and it is an Ext.Net.PortalColumn of "PortalFiltri" ext.net.portal
        FiltriColonna.Items.Add(Filtro)
    End Sub
    
    
    
    Public Function AddCampo() As Panel
        Dim Layout As New MultiField
        Layout.ID = "MULTIF_CAMPO"
    
    
        Dim Tb As New Ext.Net.TextField
        Tb.ID = "FILTRO_CAMPO"
    
    
        Dim BttnCerca As New Ext.Net.Button
        BttnCerca.Icon = Icon.Zoom
        BttnCerca.ID = "BTTN_PAGINA_CAMPO"
        BttnCerca.DirectEvents.Click.ExtraParams.Add(New Parameter("CAMPO", 1))
        BttnCerca.DirectEvents.Click.EventMask.ShowMask = True
        BttnCerca.DirectEvents.Click.EventMask.Msg = "Caricamento dati in corso..."
        AddHandler BttnCerca.DirectEvents.Click.Event, AddressOf BottoneApriFiltroPagina
    
    
        Layout.Fields.Add(Tb)
    
    
        Layout.Fields.Add(BttnCerca)
    
    
        Dim Pnl As New Panel
    
    
        Pnl.Items.Add(Layout)
    
    
        Return Pnl
    End Function
    
    
    
    
    Public Sub RemovePanel()    'first test
        Dim Pannello As Ext.Net.Panel
        Pannello = PortalFiltri.FindControl("PANELFILTRO_CAMPO")
    
    
    
        Dim Parent As PortalColumn = Pannello.Parent
    
    
        If Not IsNothing(Pannello) Then
            Parent.Remove(Pannello.ClientID)
            Parent.DoLayout()
        End If
    End sub
    
    Public Sub RemovePanel()    'second test
        Dim Contenitore As Ext.Net.Panel
        Contenitore = PortalFiltri.FindControl("PNLFILTRO_" & Campo)
    
    
        Dim Layout As New MultiField
        Layout = Contenitore.FindControl("MULTIF_" & Campo)
    
    
        If Not IsNothing(Layout) Then
            Dim Bottone As New Ext.Net.Button
            Bottone = Contenitore.FindControl("BTTN_PAGINA_" & Campo)
    
    
            If Not IsNothing(Bottone) Then
                Bottone.DirectEvents.ClearDirectEvents()
                Layout.Fields.Remove(Bottone)
            End If
        End If
    
    
        Layout.Fields.RemoveRange(0, Layout.Fields.Count)
    
    
        Contenitore.Remove(Layout.ClientID)
    
    
        Contenitore.RemoveAll()
    
    
        Contenitore.DoLayout()
    End Sub
    I try to remove panel in different ways but with no results.

    Thanks in advance

    Paolo
  2. #2

    RE: [CLOSED] [1.0] Problem with Multifield.Fields.Remove component

    Hi,

    Fixed. Please update from SVN
    Today we added CompositeField and marked MultiField as obsolete. Therefore I recommend replace all MultiField instances by CompositeField

Similar Threads

  1. [CLOSED] anchor multifield resize problem
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 16, 2010, 12:03 PM
  2. [CLOSED] [1.0] Remove fields from FormPanel
    By danielg in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 24, 2010, 1:06 PM
  3. Replies: 9
    Last Post: Aug 26, 2009, 9:21 AM
  4. Replies: 4
    Last Post: Jun 29, 2009, 8:48 AM
  5. Add and remove fields to PropertyGrid control
    By yarlenvas in forum 1.x Help
    Replies: 0
    Last Post: Mar 03, 2009, 5:56 PM

Posting Permissions