[CLOSED] Dropdown with Tree Panel not displaying default text (Razor view/2.0)

  1. #1

    [CLOSED] Dropdown with Tree Panel not displaying default text (Razor view/2.0)

    Using the code below:

    fields.Add(Html.X().DropDownField()
                                            .FieldLabel("Product/Service Type")
                                            .Margins("0 0 0 0")
                                            .LabelWidth(200)
                                            .Width(400)
                                            .Text("--- Please Select ---")
                                            .Cls("form-label")
                                            .Component(treePanel => treePanel.Add(Html.X().TreePanel()
                                                .Height(300)
                                                .Width(400)
                                                .RootVisible(false)
                                                .Root(root =>
                                                {
                                                   //tree panel stuff 
                                    }));
    The text "--- Please Select ---" doesn't appear in the box on page load. I would like this present to encourage the user to click and expand the tree...
    Last edited by Daniil; Mar 15, 2012 at 9:54 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi,

    At this moment, Please use Value instead Text
  3. #3
    Also, in your case it is better to use EmptyText

Similar Threads

  1. Replies: 1
    Last Post: Oct 26, 2012, 8:52 AM
  2. Replies: 4
    Last Post: Apr 09, 2012, 2:10 PM
  3. [CLOSED] Tree Panel Razor View Example?
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 09, 2012, 8:22 AM
  4. Replies: 6
    Last Post: Feb 08, 2011, 6:17 PM
  5. [CLOSED] Adding tree view to panel?
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 09, 2008, 11:27 AM

Posting Permissions