Apr 01, 2015, 10:34 AM
[CLOSED] Combo box marks itself as required
I have a combo box defined as:
Yet, when I focus on the field and leave it becomes red and the message says it is a required field.
Where is this required condition coming from if I am not defining it specifically for this field?
Thank you
X.ComboBoxFor(m => m.GLOBAL_TAX_CODE).FieldLabel("Tax Code").LabelWidth(80).DisplayField("ComboDisplay").ValueField("TaxCodeID")
.ListConfig(Html.X().BoundList()
.ItemTpl(Html.X().XTemplate()
.Html(@<text>
<div class="list-item">
<h3>{Name} - Rate: {RATE}%</h3>
{DESCRIPTION}
</div>
</text>)
)
)
.Store(X.Store()
.ID("TaxCodeComboStore")
.AutoLoad(true)
.Model(
X.Model()
.Name("TaxCodeCombo")
.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"))
)
)
The model property is not marked as Required. Yet, when I focus on the field and leave it becomes red and the message says it is a required field.
Where is this required condition coming from if I am not defining it specifically for this field?
Thank you
Last edited by Daniil; Apr 02, 2015 at 11:02 AM.
Reason: [CLOSED]