How do you set the model using webix components

in a cshtml file i have a model that i want to populate with variables taken from controls to send to the controller (by post). how would you do this? Is there any example codes

I want to be able to set a POCO (TMGrading) in the model which I can then persist to a database

function SaveNewTMFunction() {
var message = webix.message(“Save functionality”);
$$(“dynamicboxdatatablechaggercreation”).add({
Title: $$(“myformaddtourmanagerdetails”).getValues().tmname,
Year: $$(“myformaddtourmanagerdetails”).getValues().year,
Votes: $$(“myformaddtourmanagerdetails”).getValues().votes
})

this.Model = new TMGrading();

this.Model.PersistGrade.Id = 0;
this.Model.PersistGrade.Title = $$(“myformaddtourmanagerdetails”).getValues().tmname;
this.Model.PersistGrade.Year = $$(“myformaddtourmanagerdetails”).getValues().year;
this.Model.PersistGrade.Votes = $$(“myformaddtourmanagerdetails”).getValues().votes;

Alert(this.Model.PersistGrade.Votes);
}

Just found out - Model is read only
The below would work, but is required on the form

@Html.ActionLink(“Index”, “IndexGrading”, new MVCWebix.POCO.TMGrading() { Id = 0, Grade = 2222, Title = “Kevin Keys”, Votes = “2222”, Year = “2000” })

I need an action I can run via java script. Any ideas?

quite easy in the end you just use javascript $.ajax to do a post back with the json strings set.

Ticket closed