/// <summary>
        /// Gets the submission type of a document as an HTML-formatted tooltip-enabled string.
        /// </summary>
        /// <param name="document">The <see cref="SubmissionDocument"/> to get a tooltip for.</param>
        internal string GetSubmissionTypeText(SubmissionDocument document)
        {
            SubmissionType type     = document.SubmissionType;
            string         cssClass = string.Empty;

            switch (type)
            {
            case SubmissionType.Regular:
                cssClass = this.RegularTooltipCssClass;
                break;

            case SubmissionType.Amendment:
                cssClass = this.AmendmentTooltipCssClass;
                break;

            case SubmissionType.Resubmission:
                cssClass = this.ResubmissionTooltipCssClass;
                break;

            case SubmissionType.InternalAmendment:
                cssClass = this.IAmendmentTooltipCssClass;
                break;

            case SubmissionType.Documentation:
                cssClass = this.DocumentationTooltipCssClass;
                break;
            }
            return(string.Format("{0} {1}", CPConvert.ToString(type), string.Format(Properties.Settings.Default.TooltipFormat, string.Format("{0} {1}", this.TooltipCssClass, cssClass))));
        }
 /// <summary>
 /// Raises the <see cref="GridView.RowDataBound"/> event.
 /// </summary>
 /// <param name="e">A <see cref="GridViewRowEventArgs"/> that contains event data.</param>
 protected override void OnRowDataBound(GridViewRowEventArgs e)
 {
     base.OnRowDataBound(e);
     // additional databinding because data values are not accessible until databinding events
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         SubmissionDocument document = e.Row.DataItem as SubmissionDocument;
         if (document != null)
         {
             // skip a column when grouping (first column is group-by column)
             e.Row.Cells[this.AllowGrouping ? 2 : 1].Text = GetSubmissionTypeText(document);
             // BUGFIX #58: Corrected typo in group condition detection when populating delivery type column
             e.Row.Cells[this.AllowGrouping ? 6 : 5].Text = CPConvert.ToString(document.DeliveryType);
         }
     }
 }