Apr 07, 2015, 10:09 AM
[CLOSED] ComboBox after store load event
Is there an event where I can set a combo box selected item after the combo box store loads?
X.ComboBoxFor(m => m.TAX_CODE).FieldLabel("Tax Code").LabelWidth(80).ID("TaxCode")
.ValueField("TaxCodeID")
.AllowBlank(true)
.TypeAhead(true)
.ForceSelection(true)
.ListConfig(Html.X().BoundList()
.ItemTpl(Html.X().XTemplate()
.Html(@<text>
<div class="list-item">
<h3>{Name} - Rate: {RATE}%</h3>
{DESCRIPTION}
</div>
</text>)
)
)
.DisplayTpl(Html.X().XTemplate()
.Html(@<text>
<tpl for=".">
{Name} - Rate: {RATE}
</tpl>
</text>)
)
.Store(X.Store()
.ID("TaxCodeComboStore")
.AutoLoad(true)
.Model(
X.Model()
.Name("TaxCodeComboForCombo")
.IDProperty("TaxCodeID")
.Fields(
X.ModelField()
.Name("Name")
.Type(ModelFieldType.String),
X.ModelField()
.Name("DESCRIPTION")
.Type(ModelFieldType.String),
X.ModelField()
.Name("RATE")
.Type(ModelFieldType.Float)
)
)
.Proxy(Html.X().AjaxProxy()
.Url(Url.Action("GetList", "List", new { area = "TaxCode" }))
.Reader(Html.X().JsonReader().Root("data"))
)
Last edited by Daniil; Apr 14, 2015 at 9:52 AM.
Reason: [CLOSED]