c# - Can't bind to model value -


I can not see how to insert a drop down list for values ​​in the model.

Assume that my strongly typed model is type fa.domain.text.account .

account has a PersonId field, I want to pair it in a select drop down list. When the scene is displayed, I want to reflect the value of @ Model.PersonId .

My code is as follows:

Select the tag:

I tested some things,

  function object (PersonId , NamePP) {this.CostCentreId = ko.observable (PersonId); This.NamePP = ko.observable (NamePP); }   

should be:

  function object (PersonId, NamePP) {this.PersonId = ko.observable (PersonId); This.NamePP = ko.observable (NamePP); }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

ruby on rails - Convert a Activerecord result with has_one associations into a single hash per record -

javascript - Read complete data from stream from onMessage -