[CLOSED] Multifield + Visiblity

  1. #1

    [CLOSED] Multifield + Visiblity



    Hi,

    I've got a form with a multifield that is dependent on the selected value of a combobox.
    When i select another value of my combobox, then some fields in the multifield may be visible and other fields not. The first time, when loading, everything goes well, but when changing the selected combobox value, then i go in my ajaxmethod and change a field of the multifield to 'visible=false', but on my screen it's not updated, the field is still visible.

    example:

    
    
    
    <ext:FormLayout ID="AddEditEDIBlockColumn" runat="server" Cls="formLayout"> 
    
    
    <ext:Anchor Horizontal="90%">
    
    
    <ext:TextField ID="txtColumnName" runat="server" FieldLabel="Column Name*" 
    
    
    AllowBlank="false" BlankText="Column Name is required." />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor Horizontal="50%">
    
    
    <ext:ComboBox id="cboColumnDataType" runat="server" 
    
    
    FieldLabel="Data Type*"
    
    
    AllowBlank="false"
    
    
    BlankText="Data type is required." 
    
    
    ValueNotFoundText="Loading..." 
    
    
    >
    
    
    <Items>
    
    
    <ext:ListItem Value="BIT" Text="BIT" />
    
    
    <ext:ListItem Value="DATETIME" Text="DATETIME" />
    
    
    <ext:ListItem Value="NUMERIC" Text="NUMERIC" />
    
    
    <ext:ListItem Value="VARCHAR" Text="TEXT" />
    
    
    </Items>
    
    
    <Listeners>
    
    
    <Select Handler="Coolite.AjaxMethods.DataType_Changed();" />
    
    
    </Listeners>
    
    
    </ext:ComboBox>
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:MultiField runat="server" FieldLabel="Size" ID="MultiFieldDataType">
    
    
    <Fields>
    
    
    <ext:TextField ID="txtColumnMaxLength" runat="server" Visible="true" />
    
    
    <ext:ComboBox ID="cboColumnPrecision" runat="server" Visible="false" Width="40" />
    
    
    <ext:ComboBox ID="cboColumnScale" runat="server" Visible="false" Width="40" />
    
    
    </Fields>
    
    
    </ext:MultiField>
    
    
    </ext:Anchor>
    
    
    <ext:Anchor Horizontal="90%">
    
    
    <ext:TextField ID="txtColumnDefaultValue" runat="server" FieldLabel="Default Value" />
    
    
    </ext:Anchor> 
    
    
    <ext:Anchor>
    
    
    <ext:Checkbox ID="chkColumnIsNull" runat="server" FieldLabel="Allow Null" />
    
    
    </ext:Anchor> 
    
    
    </ext:FormLayout>
    
    
    
    <AjaxMethod()> _
    
    
    Public Sub DataType_Changed()
    
    
    Dim DataType As System.String
    
    
    If Not (Utils.IsEmpty(Me.cboColumnDataType.SelectedItem.Value)) Then
    
    
    DataType = Me.cboColumnDataType.SelectedItem.Value
    
    
    Select Case DataType.ToUpper
    
    
    Case "VARCHAR"
    
    
    Me.txtColumnMaxLength.Visible = True
    
    
    Me.cboColumnPrecision.Visible = False
    
    
    Me.cboColumnScale.Visible = False
    
    
    Case "NUMERIC"
    
    
    Me.txtColumnMaxLength.Visible = False
    
    
    Me.cboColumnPrecision.Visible = True
    
    
    Me.cboColumnScale.Visible = True
    
    
    Case Else ' DateTime or bit
    
    
    Me.txtColumnMaxLength.Visible = False
    
    
    Me.cboColumnPrecision.Visible = False
    
    
    Me.cboColumnScale.Visible = False
    
    
    End Select
    
    
    End If
    
    
    End Sub
  2. #2

    RE: [CLOSED] Multifield + Visiblity

    Hi,

    Please use Hidden property instead Visible

Similar Threads

  1. [CLOSED] MultiField Fill
    By sdevanney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 29, 2010, 6:16 AM
  2. [CLOSED] Multifield Rendering
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 23, 2009, 4:28 AM
  3. [CLOSED] Multifield bug?
    By state in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Sep 11, 2009, 5:28 AM
  4. [CLOSED] FileuploadField and Multifield
    By HOWARDJ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 24, 2009, 4:43 PM

Posting Permissions