[CLOSED] Dynamic Drop Down Field

  1. #1

    [CLOSED] Dynamic Drop Down Field

    Hi,

    I have a requirement:

    the user clicks the dropfield button - this results in a direct method is raised
    The direct method communicates our backend server which returns the data with with the drop panel needs to be built -
    This information is then used to dynamically build a panel which needs to be the contents of the drop window

    Is this possible and if so how

    Thanks

    Mac
    Last edited by Daniil; Jun 18, 2013 at 4:02 AM. Reason: [CLOSED]
  2. #2
    Hi @macinator,

    Do you need to populate with data a GridPanel's Store? If so, please look the "GridPanel with Grouping" DropDownField here:
    https://examples2.ext.net/#/Form/Dro...ield/Overview/

    The GridPanel's Store is defined with an AjaxProxy.

    If there is no GridPanel in your case and you need get some another data from server, I can recommend to use a Loader:
    https://examples2.ext.net/#/Loaders/Data/Overview/
    https://examples2.ext.net/#/Loaders/...Direct_Method/
  3. #3

    Dynamic Drop Down Field

    I think the loader will work

    Do you have an example of a dropdownfield with a component loader attached and when the combo button is selected the loader is invoked ??

    Thanks

    Mac
  4. #4
    I created a sample for you.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        public List<object> Data
        {
            get
            {
                return new List<object>()
                {
                    new {FirstName = "First 1", LastName = "Last 1"},
                    new {FirstName = "First 2", LastName = "Last 2"},
                    new {FirstName = "First 3", LastName = "Last 3"},
                    new {FirstName = "First 4", LastName = "Last 4"},
                    new {FirstName = "First 5", LastName = "Last 5"}
                };
            }
        }
    
        [DirectMethod]
        public List<object> GetData(string parameters)
        {
            return this.Data;
        }
    </script>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:DropDownField runat="server">
                <Component>
                    <ext:Panel
                        runat="server"         
                        Height="200" 
                        Width="200"        
                        BodyPadding="10"
                        Title="Data from direct method">
                        <Tpl runat="server">
                            <Html>
                                <tpl for=".">
                                    <p>{FirstName} - {LastName}</p>
                                </tpl>
                            </Html>            
                        </Tpl>        
                        <Loader runat="server" DirectMethod="#{DirectMethods}.GetData" Mode="Data">      
                            <LoadMask ShowMask="true" />      
                        </Loader>
                    </ext:Panel>
                </Component>
            </ext:DropDownField>
        </form>
    </body>
    </html>
  5. #5

    Could not able to add component in dropdown field please suggest me what could be the problem..?

    Could not able to add component in dropdown field (c# codebehind) dynamically please suggest me what could be the problem..?
  6. #6
    Hi @antoreegan,

    Your question seems to be not quite related to the original topic of this thread. Please start a new forum thread.
  7. #7

    Hi danill just have a look at this thread

    Quote Originally Posted by Daniil View Post
    Hi @antoreegan,

    Your question seems to be not quite related to the original topic of this thread. Please start a new forum thread.
    Hi danill just have a look at this thread

    http://forums.ext.net/showthread.php...-in-codebehind

Similar Threads

  1. Dropdown Field - Dynamic Drop Window
    By macinator in forum 2.x Help
    Replies: 0
    Last Post: Jun 12, 2013, 9:24 AM
  2. [CLOSED] Drag & Drop Between Dynamic grids
    By imaa in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 05, 2011, 12:34 PM
  3. Replies: 12
    Last Post: Sep 20, 2011, 2:33 PM
  4. [CLOSED] Drop down Field | Check Box Group
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 19, 2011, 10:42 AM
  5. [CLOSED] Clear selection box in drop down field
    By asztern in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 27, 2010, 12:17 PM

Posting Permissions