Template used by the GroupPickerField control
Inheritance: ITemplate
Esempio n. 1
0
        /// <summary>
        /// Performs basic instance initialization for a data control field.
        /// </summary>
        /// <param name="sortingEnabled">A value that indicates whether the control supports the sorting of columns of data.</param>
        /// <param name="control">The data control that owns the <see cref="T:System.Web.UI.WebControls.DataControlField"/>.</param>
        /// <returns>
        /// Always returns false.
        /// </returns>
        public override bool Initialize( bool sortingEnabled, Control control )
        {
            GroupPickerFieldTemplate groupPickerFieldTemplate = new GroupPickerFieldTemplate();
            groupPickerFieldTemplate.GroupPickerSelect += groupPickerFieldTemplate_GroupSelect;
            this.ItemTemplate = groupPickerFieldTemplate;
            
            ParentGrid = control as Grid;
            if ( ParentGrid != null )
            {
                ColumnIndex = ParentGrid.GetColumnIndex( this );
            }

            return base.Initialize( sortingEnabled, control );
        }
Esempio n. 2
0
        /// <summary>
        /// Performs basic instance initialization for a data control field.
        /// </summary>
        /// <param name="sortingEnabled">A value that indicates whether the control supports the sorting of columns of data.</param>
        /// <param name="control">The data control that owns the <see cref="T:System.Web.UI.WebControls.DataControlField"/>.</param>
        /// <returns>
        /// Always returns false.
        /// </returns>
        public override bool Initialize( bool sortingEnabled, Control control )
        {
            GroupPickerFieldTemplate groupPickerFieldTemplate = new GroupPickerFieldTemplate();
            groupPickerFieldTemplate.GroupPickerSelect += groupPickerFieldTemplate_GroupSelect;
            this.ItemTemplate = groupPickerFieldTemplate;

            ParentGrid = control as Grid;
            if ( ParentGrid != null )
            {
                ColumnIndex = ParentGrid.Columns.IndexOf( this );
            }

            return base.Initialize( sortingEnabled, control );
        }