How to Set The CompositeField Visible in DirectEvents

  1. #1

    How to Set The CompositeField Visible in DirectEvents

    CompositeField Controls:
    <ext:CompositeField ID="rowAmtAmount" runat="server">
       ...
    </ext:CompositeField>
    <ext:CompositeField ID="rowAuxiliary" runat="server" >
       ...
    </ext:CompositeField>
    
    DirectEvents:
    <ext:DropDownField ID="dplSubjectCode" runat="server" DataIndex="SubjectCode" Width="200" AllowBlank="false">
        <Component>
            <ext:TreePanel ID="treePanel" runat="server" Width="300" Height="300" AutoScroll="true" Collapsible="true" Header="false" AllowBlank="false">
                <DirectEvents>
                    <Click OnEvent="OnSubjectDirectSelect">
                        <ExtraParams>
                            <ext:Parameter Name="checkedNode" Value="node.id" Mode="Raw" Encode="true" />
                        </ExtraParams>
                    </Click>
                </DirectEvents>
            </ext:TreePanel>
        </Component>
    </ext:DropDownField>protected void OnSubjectDirectSelect(object sender, EventArgs e)
        {
            int id = int.Parse(((Ext.Net.DirectEventArgs)(e)).ExtraParams[0].Value.Replace("\"", ""));
            using (Data.DataEntities db = new Data.DataEntities())
            {
                Data.Subject model = db.Subject.Where(s => s.SubjectID == id).FirstOrDefault();
                rowAuxiliary.Visible = model.AuxiliaryType != 0;
                rowAmtAmount.Visible = model.IsAmtAmount;
            }
        }
    Last edited by Daniil; May 18, 2011 at 9:09 AM. Reason: Please use [CODE] tags
  2. #2
    Hi,

    Please use Hidden instead Visible, also can be required to call "DoLayout" method for CompositeField container
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Replies: 1
    Last Post: Nov 22, 2011, 6:57 PM
  2. [CLOSED] CompositeField: Only last item visible
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 21, 2011, 2:19 PM
  3. [CLOSED] CompositeField
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 28, 2011, 4:55 AM
  4. CompositeField - NoteAlign
    By Maia in forum 1.x Help
    Replies: 3
    Last Post: Aug 13, 2010, 7:48 PM
  5. Replies: 3
    Last Post: Apr 19, 2010, 5:00 AM

Tags for this Thread

Posting Permissions