Beispiel #1
0
        /// <summary>
        /// Put a text and HTML representation of our model objects
        /// into the data object.
        /// </summary>
        public void CreateTextFormats()
        {
            OLVExporter exporter = this.CreateExporter();

            // Put both the text and html versions onto the clipboard.
            // For some reason, SetText() with UnicodeText doesn't set the basic CF_TEXT format,
            // but using SetData() does.
            //this.SetText(sbText.ToString(), TextDataFormat.UnicodeText);
            this.SetData(exporter.ExportTo(OLVExporter.ExportFormat.TabSeparated));
            string exportTo = exporter.ExportTo(OLVExporter.ExportFormat.CSV);

            if (!String.IsNullOrEmpty(exportTo))
            {
                this.SetText(exportTo, TextDataFormat.CommaSeparatedValue);
            }
            this.SetText(ConvertToHtmlFragment(exporter.ExportTo(OLVExporter.ExportFormat.HTML)), TextDataFormat.Html);
        }
Beispiel #2
0
        public string CreateHtml()
        {
            OLVExporter exporter = this.CreateExporter();

            return(exporter.ExportTo(OLVExporter.ExportFormat.HTML));
        }