DropDownList only bind value not option list

189 views
Skip to first unread message

Phil Olson

unread,
Nov 11, 2012, 11:34:09 PM11/11/12
to knocko...@googlegroups.com
So currently I can do this by:

@Html.DropDownListFor(
            m => m.CountryID,
            new SelectList(GlobalStaticGetCountries(), "CountryID", "CountryName"),
            new { data_bind = "value: KOmodelName.CountryID" })

This allows me to fill the options without having them in the model, yet the value is being bound to my model's CountryID.

Is there a way to do this using your library?

Thanks,
Phil

Mikhail Kostin

unread,
Nov 22, 2012, 3:27:48 AM11/22/12
to knocko...@googlegroups.com
Dear Phil,

I'm sorry, but it is not possible with our library at this moment. But we will add such functionality in one of the next releases. Thanks for your feedback.

With best regards,
Mikhail Kostin,
Knockout MVC Team.

понедельник, 12 ноября 2012 г., 11:34:09 UTC+7 пользователь Phil Olson написал:

KE

unread,
Feb 2, 2015, 11:28:28 AM2/2/15
to knocko...@googlegroups.com
Has any functionality been added to support DDLs? 
Reply all
Reply to author
Forward
0 new messages