/// <summary>
        ///
        /// </summary>
        public XTemplate.Builder XTemplate(XTemplate component)
        {
#if MVC
            component.ViewContext = this.HtmlHelper != null ? this.HtmlHelper.ViewContext : null;
#endif
            return(new XTemplate.Builder(component));
        }
Example #2
0
        public void EnsureHeader()
        {
            if (this.View.ParentGrid is PropertyGrid)
            {
                return;
            }

            if (this.header == null)
            {
                this.header            = new XTemplate();
                this.header.PreRender += new System.EventHandler(header_PreRender);
            }
        }
Example #3
0
        protected virtual void AfterViewRemove(GridView item)
        {
            XTemplate tpl = item.Templates.Header;

            if (tpl != null)
            {
                this.Controls.Remove(item.Templates.Header);
                this.LazyItems.Remove(item.Templates.Header);
            }

            this.Controls.Remove(item);
            this.LazyItems.Remove(item);
        }
Example #4
0
        protected override void OnPreRender(EventArgs e)
        {
            foreach (ListViewColumn column in this.Columns)
            {
                XTemplate tpl = column.XTemplate;

                if (tpl.Html.IsNotEmpty())
                {
                    this.Controls.Add(tpl);
                    this.LazyItems.Add(tpl);
                }
            }
            base.OnPreRender(e);
        }
Example #5
0
        private void AfterViewAdd(GridView item)
        {
            item.ParentGrid = this;
            this.Controls.AddAt(0, item);
            this.LazyItems.Insert(0, item);

            XTemplate tpl = item.Templates.Header;

            if (tpl != null)
            {
                this.Controls.AddAt(0, tpl);
                this.LazyItems.Insert(0, tpl);
            }

            foreach (HeaderRow row in item.HeaderRows)
            {
                foreach (HeaderColumn column in row.Columns)
                {
                    this.EnsureHeaderColumn(item, column);
                }
            }
        }
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup inside the iframe element (as attributes). If an XTemplate is used, the component's subTpl data serves as the context.
 /// </summary>
 public virtual HtmlEditor.Builder IframeAttrTpl(XTemplate iframeAttrTpl)
 {
     this.ToComponent().IframeAttrTpl = iframeAttrTpl;
     return(this as HtmlEditor.Builder);
 }
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup before the textarea element. If an XTemplate is used, the component's subTpl data serves as the context.
 /// </summary>
 public virtual HtmlEditor.Builder BeforeTextAreaTpl(XTemplate beforeTextAreaTpl)
 {
     this.ToComponent().BeforeTextAreaTpl = beforeTextAreaTpl;
     return(this as HtmlEditor.Builder);
 }
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup after the textarea element. If an XTemplate is used, the component's subTpl data serves as the context.
 /// </summary>
 public virtual HtmlEditor.Builder AfterTextAreaTpl(XTemplate afterTextAreaTpl)
 {
     this.ToComponent().AfterTextAreaTpl = afterTextAreaTpl;
     return(this as HtmlEditor.Builder);
 }
Example #9
0
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup inside the label element (as attributes). If an XTemplate is used, the component's render data serves as the context.
 /// </summary>
 public virtual TBuilder LabelAttrTpl(XTemplate labelAttrTpl)
 {
     this.ToComponent().LabelAttrTpl = labelAttrTpl;
     return(this as TBuilder);
 }
Example #10
0
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup after the subTpl markup. If an XTemplate is used, the component's render data serves as the context.
 /// </summary>
 public virtual TBuilder AfterSubTpl(XTemplate afterSubTpl)
 {
     this.ToComponent().AfterSubTpl = afterSubTpl;
     return(this as TBuilder);
 }
Example #11
0
 /// <summary>
 /// The content of the field body is defined by this config option.
 /// </summary>
 public virtual TBuilder FieldSubTpl(XTemplate fieldSubTpl)
 {
     this.ToComponent().FieldSubTpl = fieldSubTpl;
     return(this as TBuilder);
 }
Example #12
0
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup inside the box label element (as attributes). If an XTemplate is used, the component's subTpl data serves as the context.
 /// </summary>
 public virtual TBuilder BoxLabelAttrTpl(XTemplate boxLabelAttrTpl)
 {
     this.ToComponent().BoxLabelAttrTpl = boxLabelAttrTpl;
     return(this as TBuilder);
 }
 /// <summary>
 /// The template used in the ghost DataView
 /// </summary>
 public virtual TBuilder GhostTpl(XTemplate ghostTpl)
 {
     this.ToComponent().GhostTpl = ghostTpl;
     return(this as TBuilder);
 }
 /// <summary>
 /// The template used in the ghost DataView
 /// </summary>
 public virtual DataViewDraggable.Builder GhostTpl(XTemplate ghostTpl)
 {
     this.ToComponent().GhostTpl = ghostTpl;
     return(this as DataViewDraggable.Builder);
 }
Example #15
0
 /// <summary>
 /// The inner portion of the item template to be rendered. Follows an XTemplate structure and will be placed inside of a tpl.
 /// </summary>
 public virtual TBuilder ItemTpl(XTemplate itemTpl)
 {
     this.ToComponent().ItemTpl = itemTpl;
     return(this as TBuilder);
 }
Example #16
0
 /// <summary>
 ///
 /// </summary>
 public virtual DesktopConfig.Builder ShortcutTpl(XTemplate shortcutTpl)
 {
     this.ToComponent().ShortcutTpl = shortcutTpl;
     return(this as DesktopConfig.Builder);
 }
Example #17
0
 /// <summary>
 /// The template used to format the Array of error messages passed to setActiveErrors into a single HTML string. By default this renders each message as an item in an unordered list.
 /// </summary>
 public virtual TBuilder ActiveErrorsTpl(XTemplate activeErrorsTpl)
 {
     this.ToComponent().ActiveErrorsTpl = activeErrorsTpl;
     return(this as TBuilder);
 }
 /// <summary>
 ///
 /// </summary>
 public virtual TBuilder ShortcutTpl(XTemplate shortcutTpl)
 {
     this.ToComponent().ShortcutTpl = shortcutTpl;
     return(this as TBuilder);
 }
Example #19
0
 /// <summary>
 ///  An optional string to insert in the field markup inside the input element (as attributes).
 /// </summary>
 public virtual TBuilder InputAttrTpl(XTemplate inputAttrTpl)
 {
     this.ToComponent().InputAttrTpl = inputAttrTpl;
     return(this as TBuilder);
 }
 /// <summary>
 /// An XTemplate used to create the internal structure inside this AbstractComponent's encapsulating Element.
 /// </summary>
 public virtual TBuilder RenderTpl(XTemplate renderTpl)
 {
     this.ToComponent().RenderTpl = renderTpl;
     return(this as TBuilder);
 }
Example #21
0
 /// <summary>
 /// An optional string or XTemplate configuration to insert in the field markup before the subTpl markup. If an XTemplate is used, the component's render data serves as the context.
 /// </summary>
 public virtual TBuilder BeforeSubTpl(XTemplate beforeSubTpl)
 {
     this.ToComponent().BeforeSubTpl = beforeSubTpl;
     return(this as TBuilder);
 }
 /// <summary>
 /// An XTemplate used to create the internal structure inside this AbstractComponent's encapsulating Element.
 /// </summary>
 public virtual TBuilder Tpl(XTemplate tpl)
 {
     this.ToComponent().Tpl = tpl;
     return(this as TBuilder);
 }
Example #23
0
        private DataView GetDataView()
        {
            DataView view = new DataView()
                {
                    ID = "DataView1"
                };

            XTemplate tpl = new XTemplate()
                {
                    ID = "XTemplate1"
                };

            tpl.Html = "<tpl for=\".\">" +
                              "<div class=\"item\">" +
                                  "<tpl if=\"!Ext.isIE6\">" +
                                      "<img src=\"../../Shared/images/touch-icons/{thumb}\" />" +
                                  "</tpl>" +
                                  "<tpl if=\"Ext.isIE6\">" +
                                      "<div style=\"position:relative;width:74px;height:74px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"../../Shared/images/touch-icons/{thumb}\")></div>" +
                                  "</tpl>" +
                                  "<h3>{name}</h3>" +
                              "</div>" +
                          "</tpl>";

            view.Tpl = tpl;

            view.Plugins.Add(new DataViewAnimated());
            view.ItemSelector = "div.item";
            view.Store.Add(this.GetStore());

            return view;
        }
Example #24
0
 /// <summary>
 ///
 /// </summary>
 public XTemplate.Builder XTemplate(XTemplate component)
 {
     return(new XTemplate.Builder(component));
 }