Apr 27, 2015, 8:26 AM
[CLOSED] Button appears as disabled after .disabled = false set
I set a button on window as disabled until a store is loaded:
X.Button().Text("Save").ID("SaveButtonEdit").Disabled(true)
.Store(X.Store()
.ID("AccountStatusDataComboStore")
//.AutoLoad(true)
.Model(
X.Model()
.Name("AccountStatusDataForCombo")
.IDProperty("Id")
.Fields(
X.ModelField()
.Name("STATUS")
.Type(ModelFieldType.String)
)
)
.Proxy(Html.X().AjaxProxy()
.Url(Url.Action("GetList", "List", new { area = "AccountStatusData" }))
.Reader(Html.X().JsonReader().Root("data"))
)
.Listeners(l => l.Load.Handler = "enableSave();" )
)
var enableSave = function () {
App.SaveButtonEdit.disabled = false;
};
And the point is that the button does get enabled, you can click it, but it appears visually as disable so it is misleading to the user.
Last edited by Daniil; Apr 28, 2015 at 9:26 AM.
Reason: [CLOSED]