Exemplo n.º 1
0
        /// <summary>
        /// Configura a fonte de dados.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="widget"></param>
        /// <returns></returns>
        public static Colosoft.Kendo.Mvc.UI.Fluent.ModelBuilder <T> Model <T>(this global::Kendo.Mvc.UI.Fluent.WidgetFactory widget) where T : class
        {
            var modelDescriptor = new CustomModelDescriptor(typeof(T));
            var builder         = new Colosoft.Kendo.Mvc.UI.Fluent.ModelBuilder <T>(modelDescriptor, widget.HtmlHelper.ViewContext, widget.Initializer, widget.UrlGenerator);

            return(builder);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="modelDescriptor"></param>
 /// <param name="viewContext"></param>
 /// <param name="initializer"></param>
 public ModelComponent(CustomModelDescriptor modelDescriptor, ViewContext viewContext, global::Kendo.Mvc.Infrastructure.IJavaScriptInitializer initializer) : base(viewContext, initializer)
 {
     _modelDescriptor = modelDescriptor;
 }