Rock.Web.UI.Controls.DateTimeField.Initialize C# (CSharp) Method

Initialize() public method

Initializes the T:System.Web.UI.WebControls.BoundField object.
public Initialize ( bool enableSorting, Control control ) : bool
enableSorting bool true if sorting is supported; otherwise, false.
control System.Web.UI.Control The data control that owns the .
return bool
        public override bool Initialize( bool enableSorting, Control control )
        {
            string script = @"
            $('.grid-table tr td span.date-time-field').tooltip({html: true, container: 'body', delay: { show: 100, hide: 100 }});
            $('.grid-table tr td span.date-time-field').click( function(){ $(this).tooltip('hide'); });;
            ";
            ScriptManager.RegisterStartupScript( control, control.GetType(), "date-time-field-popover", script, true );

            return base.Initialize( enableSorting, control );
        }