May 02, 2012, 6:52 PM
[CLOSED] MVC Grid - Server Databinding
How can I bind a grid store to a model from the server? I had thought that something like this would work:
.Store(Sub(action)
action.Add(Html.X.Store().AutoLoad(True) _
.Model(Sub(mdl)
mdl.Add(Html.X().Model.Fields(Sub(fields)
fields.Add(Html.X.ModelField.Name("Name"))
fields.Add(Html.X.ModelField.Name("UKCode"))
fields.Add(Html.X.ModelField.Name("DateSentToRI").Type(ModelFieldType.Date).DateFormat("M$"))
fields.Add(Html.X.ModelField.Name("DateSignedDocSentToRI").Type(ModelFieldType.Date).DateFormat("M$"))
fields.Add(Html.X.ModelField.Name("Code"))
fields.Add(Html.X.ModelField.Name("TrackDates").Type(ModelFieldType.Boolean))
fields.Add(Html.X.ModelField.Name("DateReceivedFromRI").Type(ModelFieldType.Date).DateFormat("M$"))
fields.Add(Html.X.ModelField.Name("NeverSigning").Type(ModelFieldType.Boolean))
End Sub))
End Sub) _
.PageSize(20).DataSource(Model))
End Sub)
(Model is a List(of CustomType)) However, this doesn't work. Can you tell me if this is possible, and if so how?
Last edited by Daniil; May 04, 2012 at 9:52 PM.
Reason: [CLOSED]