May 03, 2012, 8:41 PM
[CLOSED] MVC3 Editor Template
I am trying to create an editor template and need a little help. Here is my code:
@modelType Models.LookUp
@code
If Model IsNot Nothing Then
Html.X.ComboBox().ValueField("DataValueField").DisplayField("DataTextField") _
.QueryMode(DataLoadMode.Local) _
.Store(Sub(action)
action.Add(Html.X.Store().DataSource(Model.Options) _
.Model(Sub(mdl)
mdl.Add(Html.X.Model().Fields(Sub(flds)
flds.Add("DataTextField")
flds.Add("DataValueField")
End Sub))
End Sub))
End Sub) _
.ID(ViewData.ModelMetadata.PropertyName) _
.Listeners(Sub(action)
action.TriggerClick().AddScript("this.clearValue();")
End Sub) _
.Triggers(Sub(trg)
trg.Add(Html.X.FieldTrigger().Icon(TriggerIcon.Clear).Qtip("Clear Selection"))
End Sub).Render()
End If
End Code
I am receiving an error "Error executing child request for handler 'Ext.Net.SelfRenderingPage'." Is there another way that I shold go about creating an editor template with your controls?
Last edited by Daniil; May 08, 2012 at 11:34 AM.
Reason: [CLOSED]