Hello
i know a panel accept only Ext.net.AbstractComponent as Item but is there a way to using Regular mvc Component like Html.EditorFor or telerik component as Item in ItemsPanel?
Printable View
Hello
i know a panel accept only Ext.net.AbstractComponent as Item but is there a way to using Regular mvc Component like Html.EditorFor or telerik component as Item in ItemsPanel?
Hello @orpheus!
Use.Content()
instead of.Items()
and watch out for layout issues -- the components' layout may be compromised once you use arbitrary HTML within a component/container, just because it does not know what to expect, nor knows how to communicate with whatever is within.
One possible way to avoid layout issues is to give the container a fixed width/height, but it should be handled case by case, you should try it and then fix as issues arise, it will greatly depend on what you're using inside.
Hope this helps!
Hello @fabricio.murta
thanks for replay but when i used this Way(using .Content() instead of .Items() ) with this code
the following exception was thrownCode:X.FormPanel()
.ID("FormPanel1")
.RTL(true)
.Title("Update ")
.Frame(true)
.RTL(true)
.Cls("panelTitle winTitle")
.BodyPadding(10)
.Content(Html.EditorFor(x=>x.Title))
also i triedQuote:
cannot convert from 'System.Web.Mvc.MvcHtmlString' to 'System.Func<object, object>'
but modelBinding did not work properly and title (x => x.Title) Could not add to ModelCode:
.Content(@<text>
@(Html.EditorFor(x => x.Title))
</text>)