[CLOSED] html tags inside panel's items

  1. #1

    [CLOSED] html tags inside panel's items

    Hi,

    I want to embed HTML tags inside Panel's Items collection. How can I do that? Below piece of code I took from http://mvc.ext.net/#/Form_ComboBox/Custom_Search/

    Ex:
    HTML.X.Panel().Items
    (
    // **** Custom Search Code
            <div style="width:600px;">
            <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
            <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
                <h3 style="margin-bottom:5px;">Search the plants</h3>
    
                @(Html.X().ComboBox()
                    .DisplayField("Common")
                    .ValueField("Common")
                    .TypeAhead(false)
                    .Width(500)
                    .PageSize(10)
                    .HideTrigger(true)
                    .MinChars(0)
                    .TriggerAction(TriggerAction.Query)
                    .ListConfig(Html.X().BoundList()
                        .LoadingText("Searching...")
                        .ItemTpl(Html.X().XTemplate()
                            .Html(@<text>
                                <div class="search-item">
                                    <h3><span>${Price}</span>{Common}</h3>
                                    {Botanical}
                                </div>
                            </text>)
                        )
                    )
                    .Store(Html.X().Store()
                        .AutoLoad(false)
                        .Proxy(Html.X().AjaxProxy()
                            .Url(Url.Action("GetPlants"))
                            .ActionMethods(am => am.Read = HttpMethod.POST)
                            .Reader(Html.X().JsonReader().RootProperty("data"))
                        )
                        .Model(Html.X().Model()
                            .Fields(
                                Html.X().ModelField().Name("Common"),
                                Html.X().ModelField().Name("Botanical"),
                                Html.X().ModelField().Name("Light"),
                                Html.X().ModelField().Name("Price").Type(ModelFieldType.Float),
                                Html.X().ModelField().Name("Indoor").Type(ModelFieldType.Boolean)
                            )
                        )
                    )
                )
                <div style="padding-top:4px;">
                Plants search (type '*' (asterisk) for showing all)
            </div>
            </div></div></div>
            <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
        </div>
    )
    Thanks
    Last edited by Daniil; Oct 16, 2015 at 12:09 PM. Reason: [CLOSED]
  2. #2
    Hi @sharmav1,

    A Panel's Items can only hold Ext.NET components.

    You can put HTML markup into Content:
    http://forums.ext.net/showthread.php...ll=1#post87302

Similar Threads

  1. [CLOSED] How to add html tags in Ext.net Container using Asp.net MVC
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 06, 2014, 10:11 AM
  2. Replies: 9
    Last Post: Oct 08, 2012, 7:49 AM
  3. Add html content inside ext:panel tags
    By kirkhas in forum 1.x Help
    Replies: 15
    Last Post: Aug 03, 2011, 10:19 PM
  4. html tags inside container
    By [WP]joju in forum 1.x Help
    Replies: 4
    Last Post: Nov 20, 2009, 2:39 AM
  5. html tags in textfields
    By [WP]joju in forum 1.x Help
    Replies: 0
    Last Post: Apr 16, 2009, 9:46 AM

Posting Permissions