Inheritance: RockTemplateField
Ejemplo n.º 1
0
        /// <summary>
        /// When implemented by a class, defines the <see cref="T:System.Web.UI.Control" /> object that child controls and templates belong to. These child controls are in turn defined within an inline template.
        /// </summary>
        /// <param name="container">The <see cref="T:System.Web.UI.Control" /> object to contain the instances of controls from the inline template.</param>
        public void InstantiateIn(Control container)
        {
            DataControlFieldCell cell = container as DataControlFieldCell;

            if (cell != null)
            {
                this.LiquidField = cell.ContainingField as LiquidField;
                Literal lOutputText = new Literal();
                lOutputText.DataBinding += lOutputText_DataBinding;
                cell.Controls.Add(lOutputText);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the grid field.
 /// </summary>
 /// <param name="entityType">Type of the entity.</param>
 /// <param name="selection">The selection.</param>
 /// <returns></returns>
 public override System.Web.UI.WebControls.DataControlField GetGridField( Type entityType, string selection )
 {
     var result = new LiquidField();
     result.LiquidKey = entityType.Name;
     result.LiquidTemplate = selection;
     return result;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// When implemented by a class, defines the <see cref="T:System.Web.UI.Control" /> object that child controls and templates belong to. These child controls are in turn defined within an inline template.
 /// </summary>
 /// <param name="container">The <see cref="T:System.Web.UI.Control" /> object to contain the instances of controls from the inline template.</param>
 public void InstantiateIn( Control container )
 {
     DataControlFieldCell cell = container as DataControlFieldCell;
     if ( cell != null )
     {
         this.LiquidField = cell.ContainingField as LiquidField;
         Literal lOutputText = new Literal();
         lOutputText.DataBinding += lOutputText_DataBinding;
         cell.Controls.Add( lOutputText );
     }
 }