Oct 07, 2015, 1:34 PM
[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:
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]