Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
How to set a viewbag as a datasource in Javascript
posted

HI, I'm trying to set the datasource in a combo box to a viewbag in Javascript but it does not appear to work.  Any suggestions?

columnSettings: [
{
columnKey: 'SiteContactID', required: true, editorType: "combo",
editorOptions: {
textKey: 'name',
valueKey: 'id',
datasource: '@viewBag.Farms',
autoComplete: true,
dropdownMinHeight: 200
}
}
]