{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "grid-exporting",
  "framework": "winforms",
  "type": "registry:component",
  "component": "Grid",
  "variant": "exporting",
  "dependencies": [
    "Syncfusion.Grid.Windows"
  ],
  "description": "Grid populated with numeric data and exported to Word via GridWordConverter with DocIO-rendered headers and footers.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 2 (v34.1.29)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winforms/llms.txt",
    "skillPack": "syncfusion/winforms-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winforms/grid-exporting.md"
  },
  "files": [
    {
      "target": "src/components/grid-exporting/Form1.cs",
      "content": "#region Copyright Syncfusion Inc. 2001 - 2015\n//\n//  Copyright Syncfusion Inc. 2001 - 2015. All rights reserved.\n//\n//  Use of this code is subject to the terms of our license.\n//  A copy of the current license can be obtained at any time by e-mailing\n//  licensing@syncfusion.com. Any infringement will be prosecuted under\n//  applicable laws. \n//\n#endregion\n\nusing System;\nusing System.Drawing;\nusing System.Collections;\nusing System.ComponentModel;\nusing System.Windows.Forms;\nusing System.Data;\nusing System.IO;\nusing System.Drawing.Imaging;\n\nusing Syncfusion.Windows.Forms.Grid;\nusing Syncfusion.DocIO;\nusing Syncfusion.DocIO.DLS;\nusing System.Collections.Generic;\nusing Syncfusion.Windows.Forms;\nusing System.Collections.Specialized;\nusing System.Diagnostics;\nusing Syncfusion.Drawing;\nusing Syncfusion.Pdf.Graphics;\nusing Syncfusion.Pdf;\nusing Syncfusion.Diagnostics;\nusing Syncfusion.XlsIO;\nusing Syncfusion.GridExcelConverter;\nusing Syncfusion.GridHelperClasses;\nusing System.Text;\nusing DemoCommon.Grid;\nusing Syncfusion.Telemetry;\n\n\nnamespace ExportingDemo\n{\n\tpublic class Form1 : GridDemoForm\n    {\n        #region API Definition\n        private Syncfusion.Windows.Forms.Grid.GridControl gridControl1;\n        private System.Windows.Forms.Panel panel1;\n        private GroupBox groupBox1;\n        private ButtonAdv buttonAdv1;\n        private Syncfusion.Windows.Forms.Tools.XPTaskBar xpTaskBar1;\n        private Syncfusion.Windows.Forms.Tools.XPTaskBarBox xpTaskBarBox4;\n        private Syncfusion.Windows.Forms.Tools.GradientPanel gradientPanel4;\n        private IContainer components;\n        #endregion\n\n        #region Constructor\n        public Form1()\n\t\t{\n\t\t\tInitializeComponent();\n            if (DpiAware.GetCurrentDpi() > 96)\n            {\n                this.CaptionBarHeight = (int)DpiAware.LogicalToDeviceUnits(this.CaptionBarHeight);\n            }\n            this.gridControl1.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro;\n           // this.gridControl1.AllowProportionalColumnSizing = true;\n\t\t\tGridModel model = gridControl1.Model;\n\t\t\tmodel.Options.FloatCellsMode = GridFloatCellsMode.OnDemandCalculation;            \n\t\t\tGridFontInfo boldFont = new GridFontInfo();\n\t\t\tboldFont.Bold = true;\t\t\t\n\t\t\tboldFont.Size = 10;\n\t\t\tboldFont.Underline = true;\n\t\t\tgridControl1.Rows.DefaultSize += 2;\n\t\t\tint boldfontRowHeight = gridControl1.Rows.DefaultSize + 6;\n\n          \n\t\t\tmodel.Options.ControllerOptions = GridControllerOptions.All;\n\t\t\tmodel.Options.DataObjectConsumerOptions = GridDataObjectConsumerOptions.All;\n\t\t\tGridStyleInfo standard = model.BaseStylesMap[\"Standard\"].StyleInfo;\n\t\t\tGridStyleInfo header = model.BaseStylesMap[\"Header\"].StyleInfo;\n\t\t\tGridStyleInfo rowHeader = model.BaseStylesMap[\"Row Header\"].StyleInfo;\n\t\t\tGridStyleInfo colHeader = model.BaseStylesMap[\"Column Header\"].StyleInfo;\n\t\t\theader.Interior = new BrushInfo(SystemColors.Control);\n\t\t\trowHeader.Interior = new BrushInfo(SystemColors.Control);\t\t\t\n\t\t\tstandard.Font.Facename = \"Helvetica\";\n\t\t\tstandard.VerticalAlignment = GridVerticalAlignment.Middle;\n            this.gridControl1.RowCount = 50;\n            this.xpTaskBarBox4.Collapsed = true;\n            this.xpTaskBarBox4.AfterAnimation += new EventHandler(xpTaskBarBox4_AfterAnimation);\n\n            //tab key navigation set as false to move the next control\n            this.gridControl1.WantTabKey = false;\n            this.gridControl1.ColWidths[0] = (int)DpiAware.LogicalToDeviceUnits(35);\n\n        }\n\n        void xpTaskBarBox4_AfterAnimation(object sender, EventArgs e)\n        {\n            this.gridControl1.BeginInit();\n            this.gridControl1.Model.ClearCells(GridRangeInfo.Table(), true);\n            this.gridControl1.ResetColWidthEntries();\n            this.gridControl1.ResetRowHeightEntries();\n            if (xpTaskBarBox4.Collapsed == false)\n            {\n                this.populateTheGridWord();\n            }\n            this.gridControl1.EndInit();\n        }\n        #endregion                      \n\n        #region Desginer Stuffs\n        /// <summary>\n\t\t/// Required method for Designer support - do not modify\n\t\t/// the contents of this method with the code editor.\n\t\t/// </summary>\n\t\tprivate void InitializeComponent()\n\t\t{\n            this.components = new System.ComponentModel.Container();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo1 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo2 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo3 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo4 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo5 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo6 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo7 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            Syncfusion.Windows.Forms.Grid.GridCellInfo gridCellInfo8 = new Syncfusion.Windows.Forms.Grid.GridCellInfo();\n            this.gridControl1 = new Syncfusion.Windows.Forms.Grid.GridControl();\n            this.panel1 = new System.Windows.Forms.Panel();\n            this.xpTaskBar1 = new Syncfusion.Windows.Forms.Tools.XPTaskBar();\n            this.xpTaskBarBox4 = new Syncfusion.Windows.Forms.Tools.XPTaskBarBox();\n            this.gradientPanel4 = new Syncfusion.Windows.Forms.Tools.GradientPanel();\n            this.groupBox1 = new System.Windows.Forms.GroupBox();\n            this.buttonAdv1 = new Syncfusion.Windows.Forms.ButtonAdv();\n            ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();\n            this.panel1.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.xpTaskBar1)).BeginInit();\n            this.xpTaskBar1.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.xpTaskBarBox4)).BeginInit();\n            this.xpTaskBarBox4.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.gradientPanel4)).BeginInit();\n            this.gradientPanel4.SuspendLayout();\n            this.groupBox1.SuspendLayout();\n            this.SuspendLayout();\n            // \n            // gridControl1\n            // \n            this.gridControl1.DpiAware = true;\n            this.gridControl1.AlphaBlendSelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(94)))), ((int)(((byte)(171)))), ((int)(((byte)(222)))));\n            //this.gridControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            //| System.Windows.Forms.AnchorStyles.Left) \n            //| System.Windows.Forms.AnchorStyles.Right)));\n            this.gridControl1.Dock = DockStyle.Fill;\n            this.gridControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n            this.gridControl1.ColCount = 9;\n            this.gridControl1.ColWidthEntries.AddRange(new Syncfusion.Windows.Forms.Grid.GridColWidth[] {\n            new Syncfusion.Windows.Forms.Grid.GridColWidth(0, 35),\n            new Syncfusion.Windows.Forms.Grid.GridColWidth(3, 179),\n            new Syncfusion.Windows.Forms.Grid.GridColWidth(4, 196)});\n            this.gridControl1.DefaultGridBorderStyle = Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid;\n            this.gridControl1.Font = new System.Drawing.Font(\"Segoe UI\", 8.5F);\n            this.gridControl1.ForeColor = System.Drawing.Color.MidnightBlue;\n            gridCellInfo1.Col = -1;\n            gridCellInfo1.Row = -1;\n            gridCellInfo1.StyleInfo.Font.Bold = false;\n            gridCellInfo1.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo1.StyleInfo.Font.Italic = false;\n            gridCellInfo1.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo1.StyleInfo.Font.Strikeout = false;\n            gridCellInfo1.StyleInfo.Font.Underline = false;\n            gridCellInfo1.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo2.Col = -1;\n            gridCellInfo2.Row = -1;\n            gridCellInfo2.StyleInfo.Font.Bold = false;\n            gridCellInfo2.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo2.StyleInfo.Font.Italic = false;\n            gridCellInfo2.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo2.StyleInfo.Font.Strikeout = false;\n            gridCellInfo2.StyleInfo.Font.Underline = false;\n            gridCellInfo2.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo3.Col = -1;\n            gridCellInfo3.Row = -1;\n            gridCellInfo3.StyleInfo.Font.Bold = false;\n            gridCellInfo3.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo3.StyleInfo.Font.Italic = false;\n            gridCellInfo3.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo3.StyleInfo.Font.Strikeout = false;\n            gridCellInfo3.StyleInfo.Font.Underline = false;\n            gridCellInfo3.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo4.Col = -1;\n            gridCellInfo4.Row = -1;\n            gridCellInfo4.StyleInfo.Font.Bold = false;\n            gridCellInfo4.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo4.StyleInfo.Font.Italic = false;\n            gridCellInfo4.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo4.StyleInfo.Font.Strikeout = false;\n            gridCellInfo4.StyleInfo.Font.Underline = false;\n            gridCellInfo4.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo5.Col = -1;\n            gridCellInfo5.Row = -1;\n            gridCellInfo5.StyleInfo.Font.Bold = false;\n            gridCellInfo5.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo5.StyleInfo.Font.Italic = false;\n            gridCellInfo5.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo5.StyleInfo.Font.Strikeout = false;\n            gridCellInfo5.StyleInfo.Font.Underline = false;\n            gridCellInfo5.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo6.Col = -1;\n            gridCellInfo6.Row = -1;\n            gridCellInfo6.StyleInfo.Font.Bold = false;\n            gridCellInfo6.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo6.StyleInfo.Font.Italic = false;\n            gridCellInfo6.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo6.StyleInfo.Font.Strikeout = false;\n            gridCellInfo6.StyleInfo.Font.Underline = false;\n            gridCellInfo6.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo7.Col = -1;\n            gridCellInfo7.Row = -1;\n            gridCellInfo7.StyleInfo.Font.Bold = false;\n            gridCellInfo7.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo7.StyleInfo.Font.Italic = false;\n            gridCellInfo7.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo7.StyleInfo.Font.Strikeout = false;\n            gridCellInfo7.StyleInfo.Font.Underline = false;\n            gridCellInfo7.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            gridCellInfo8.Col = -1;\n            gridCellInfo8.Row = -1;\n            gridCellInfo8.StyleInfo.Font.Bold = false;\n            gridCellInfo8.StyleInfo.Font.Facename = \"Segoe UI\";\n            gridCellInfo8.StyleInfo.Font.Italic = false;\n            gridCellInfo8.StyleInfo.Font.Size = 8.5F;\n            gridCellInfo8.StyleInfo.Font.Strikeout = false;\n            gridCellInfo8.StyleInfo.Font.Underline = false;\n            gridCellInfo8.StyleInfo.Font.Unit = System.Drawing.GraphicsUnit.Point;\n            this.gridControl1.GridCells.AddRange(new Syncfusion.Windows.Forms.Grid.GridCellInfo[] {\n            gridCellInfo1,\n            gridCellInfo2,\n            gridCellInfo3,\n            gridCellInfo4,\n            gridCellInfo5,\n            gridCellInfo6,\n            gridCellInfo7,\n            gridCellInfo8});\n            this.gridControl1.ThemesEnabled = true;\n            //this.gridControl1.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro;\n            //this.gridControl1.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro;\n            this.gridControl1.DefaultRowHeight = (int)DpiAware.LogicalToDeviceUnits(20.0f);\n            this.gridControl1.DefaultColWidth = (int)DpiAware.LogicalToDeviceUnits(70.0f);\n            this.gridControl1.HorizontalThumbTrack = true;\n            this.gridControl1.Location = new System.Drawing.Point(11, 7);\n            //this.gridControl1.MetroScrollBars = true;\n            this.gridControl1.Name = \"gridControl1\";\n            this.gridControl1.Properties.BackgroundColor = System.Drawing.Color.White;\n            this.gridControl1.Properties.ForceImmediateRepaint = false;\n            this.gridControl1.Properties.GridLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));\n            this.gridControl1.Properties.MarkColHeader = false;\n            this.gridControl1.Properties.MarkRowHeader = false;\n            this.gridControl1.RightToLeft = System.Windows.Forms.RightToLeft.No;\n            this.gridControl1.RowCount = 30;\n            this.gridControl1.RowHeightEntries.AddRange(new Syncfusion.Windows.Forms.Grid.GridRowHeight[] {\n            new Syncfusion.Windows.Forms.Grid.GridRowHeight(0, 21)});\n            this.gridControl1.SerializeCellsBehavior = Syncfusion.Windows.Forms.Grid.GridSerializeCellsBehavior.SerializeIntoCode;\n            this.gridControl1.Size = new System.Drawing.Size(657, 442);\n            this.gridControl1.SmartSizeBox = false;\n            this.gridControl1.TabIndex = 0;\n            this.gridControl1.VerticalThumbTrack = true;\n            this.gridControl1.SaveCellText += new Syncfusion.Windows.Forms.Grid.GridCellTextEventHandler(this.gridControl1_SaveCellText);\n            this.gridControl1.SaveCellFormattedText += new Syncfusion.Windows.Forms.Grid.GridCellTextEventHandler(this.gridControl1_SaveCellFormattedText);\n            // \n            // panel1\n            // \n            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n            this.panel1.BackColor = System.Drawing.Color.White;\n            this.panel1.Controls.Add(this.gridControl1);\n            this.panel1.Controls.Add(this.xpTaskBar1);\n            this.panel1.Location = new System.Drawing.Point(0, 0);\n            this.panel1.Name = \"panel1\";\n            this.panel1.Size = new System.Drawing.Size(1001, 468);\n            this.panel1.TabIndex = 4;\n            // \n            // xpTaskBar1\n            // \n            this.xpTaskBar1.Dock = DockStyle.Right;\n            this.xpTaskBar1.AutoSize = true;\n            this.xpTaskBar1.BackColor = System.Drawing.Color.White;\n            this.xpTaskBar1.BeforeTouchSize = new System.Drawing.Size(310, 200);\n            this.xpTaskBar1.BorderColor = System.Drawing.Color.Black;\n            this.xpTaskBar1.Controls.Add(this.xpTaskBarBox4);\n            this.xpTaskBar1.Location = new System.Drawing.Point(685, 7);\n            this.xpTaskBar1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218)))));\n            this.xpTaskBar1.MinimumSize = new System.Drawing.Size(0, 0);\n            this.xpTaskBar1.Name = \"xpTaskBar1\";\n            this.xpTaskBar1.Size = new System.Drawing.Size(310, 200);\n            this.xpTaskBar1.TabIndex = 20;\n            // \n            // xpTaskBarBox4\n            // \n            this.xpTaskBarBox4.BackColor = System.Drawing.Color.White;\n            this.xpTaskBarBox4.Controls.Add(this.gradientPanel4);\n            this.xpTaskBarBox4.Font = new System.Drawing.Font(\"Segoe UI\", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.xpTaskBarBox4.HeaderBackColor = System.Drawing.Color.DarkGray;\n            this.xpTaskBarBox4.HeaderForeColor = System.Drawing.Color.White;\n            this.xpTaskBarBox4.HeaderImageIndex = -1;\n            this.xpTaskBarBox4.HitTaskBoxArea = false;\n            this.xpTaskBarBox4.HotTrackColor = System.Drawing.Color.Empty;\n            this.xpTaskBarBox4.ItemBackColor = System.Drawing.Color.White;\n            this.xpTaskBarBox4.Location = new System.Drawing.Point(0, 0);\n            this.xpTaskBarBox4.Name = \"xpTaskBarBox4\";\n            this.xpTaskBarBox4.PreferredChildPanelHeight = (int)DpiAware.LogicalToDeviceUnits(109.0f);\n            this.xpTaskBarBox4.Size = new System.Drawing.Size(310, 140);\n            this.xpTaskBarBox4.TabIndex = 3;\n            this.xpTaskBarBox4.Text = \"WORD\";\n            // \n            // gradientPanel4\n            // \n            this.gradientPanel4.AutoSize = true;\n            this.gradientPanel4.BackColor = System.Drawing.Color.White;\n            this.gradientPanel4.BorderStyle = System.Windows.Forms.BorderStyle.None;\n            this.gradientPanel4.Controls.Add(this.groupBox1);\n            this.gradientPanel4.Location = new System.Drawing.Point(2, 29);\n            this.gradientPanel4.Name = \"gradientPanel4\";\n            this.gradientPanel4.Size = new System.Drawing.Size(306, 109);\n            this.gradientPanel4.TabIndex = 0;\n            // \n            // groupBox1\n            // \n            this.groupBox1.BackColor = System.Drawing.Color.White;\n            this.groupBox1.Controls.Add(this.buttonAdv1);\n            this.groupBox1.Location = new System.Drawing.Point(7, 3);\n            this.groupBox1.Name = \"groupBox1\";\n            this.groupBox1.Size = new System.Drawing.Size(297, 96);\n            this.groupBox1.TabIndex = 14;\n            this.groupBox1.TabStop = false;\n            // \n            // buttonAdv1\n            // \n            this.buttonAdv1.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Metro;\n            this.buttonAdv1.FlatStyle = FlatStyle.Flat;\n            this.buttonAdv1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(165)))), ((int)(((byte)(220)))));\n            this.buttonAdv1.BeforeTouchSize = new System.Drawing.Size(121, 32);\n            this.buttonAdv1.DialogResult = System.Windows.Forms.DialogResult.Cancel;\n            this.buttonAdv1.Font = new System.Drawing.Font(\"Segoe UI\", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.buttonAdv1.ForeColor = System.Drawing.Color.White;\n            this.buttonAdv1.IsBackStageButton = false;\n            this.buttonAdv1.Location = new System.Drawing.Point(85, 48);\n            this.buttonAdv1.Name = \"buttonAdv1\";\n            this.buttonAdv1.Size = new System.Drawing.Size(121, 32);\n            this.buttonAdv1.TabIndex = 14;\n            this.buttonAdv1.Text = \"    Word Export\";\n            this.buttonAdv1.Click += new System.EventHandler(this.buttonAdv1_Click);\n            // \n            // Form1\n            // \n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.ClientSize = new System.Drawing.Size(1013, 468);\n            this.Controls.Add(this.panel1);\n            this.MinimumSize = new System.Drawing.Size(800, 400);\n            this.Name = \"Form1\";\n            this.Text = \"Word Export\";\n            this.Load += new System.EventHandler(this.Form1_Load);\n            ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();\n            this.panel1.ResumeLayout(false);\n            this.panel1.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.xpTaskBar1)).EndInit();\n            this.xpTaskBar1.ResumeLayout(false);\n            ((System.ComponentModel.ISupportInitialize)(this.xpTaskBarBox4)).EndInit();\n            this.xpTaskBarBox4.ResumeLayout(false);\n            this.xpTaskBarBox4.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.gradientPanel4)).EndInit();\n            this.gradientPanel4.ResumeLayout(false);\n            this.groupBox1.ResumeLayout(false);\n            this.ResumeLayout(false);\n\n\t\t}\n        private void Form1_Load(object sender, System.EventArgs e)\n        {\n            this.populateTheGridWord();\n            this.gridControl1.TableStyle.TextColor = Color.DimGray;\n        }\n        #region Dispose\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                if (components != null)\n                {\n                    components.Dispose();\n                }\n            }\n            base.Dispose(disposing);\n        }\n        #endregion\n\t\t#endregion\n\n        #region Main\n        /// <summary>\n\t\t/// The main entry point for the application.\n\t\t/// </summary>\n\t\t[STAThread]\n\t\tpublic static void Main()\n        {\n\t\t\tTelemetry.Disable();\n            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(Syncfusion.Licensing.DemoCommon.FindLicenseKey());\n            # if SyncfusionFramework1_1 || SyncfusionFramework2_0  \n\t\t\tApplication.EnableVisualStyles();\t\t\t\n              # endif\n\t\t\tApplication.Run(new Form1());\n\t\t}\n        #endregion\n\n        #region Methods\n\n        private void populateTheGridWord()\n        {\n            this.gridControl1.SuspendLayout();\n            Random rand = new Random();\n            for (int i = 1; i <= gridControl1.RowCount; i++)\n                for (int j = 1; j <= gridControl1.ColCount; j++)\n                {\n                    this.gridControl1[i, j].Text = (10 * (i * j)).ToString();\n                    this.gridControl1[0, j].Text = \"C\" + j.ToString();\n                    this.gridControl1[i, 0].Text = \"R\" + i.ToString();\n                }\n            this.gridControl1.ColWidths[0] = (int)DpiAware.LogicalToDeviceUnits(35);\n            this.gridControl1.ResumeLayout();\n        }\n\n       \n        private void gridControl1_SaveCellText(object sender, Syncfusion.Windows.Forms.Grid.GridCellTextEventArgs e)\n\t\t{\n\t\t\tTraceUtil.TraceCurrentMethodInfo(e);\n\t\t\tParseText(e);\n\t\t}\n\n\t\tprivate void gridControl1_SaveCellFormattedText(object sender, GridCellTextEventArgs e)\n\t\t{\n\t\t\tTraceUtil.TraceCurrentMethodInfo(e);\n\t\t\tParseText(e);\n\t\t}\n\n\t\tvoid ParseText(GridCellTextEventArgs e)\n\t\t{\n\t\t\t// By default, the grid will display a warning message box informing the user\n\t\t\t// the entered value is not valid and the user will have to change the value.\n\t\t\t//\n\t\t\t// In this event handler we change the grid defaults behavior such that\n\t\t\t// when the user enters a value that does not fit the cells CellValueType,\n\t\t\t// the input text is accepted and no warning message is shown.\n\t\t\tif (e.Handled || e.Style.Tag == null || !e.Style.Tag.Equals(\"Custom\"))\n\t\t\t\treturn;\n\n\t\t\tSystem.Globalization.CultureInfo ci = e.Style.CultureInfo;\n\t\t\tSystem.Globalization.NumberFormatInfo nfi = ci != null ? ci.NumberFormat : null; \n\t\t\ttry\n\t\t\t{\n\t\t\t\te.Style.CellValue = GridCellValueConvert.Parse(e.Text, e.Style.CellValueType, nfi, e.Style.Format);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tif (ex is FormatException || ex.InnerException is FormatException)\n\t\t\t\t{\n\t\t\t\t\te.Style.CellValue = e.Text;\n\t\t\t\t\t// possibly could also change CellValueType here \n\t\t\t\t\te.Style.CellValueType = typeof(string);\n\t\t\t\t\tConsole.WriteLine(\"Changed e.Style.CellValueType = typeof(string) for \" + e.Style.Identity.ToString());\n\t\t\t\t\t// - or -\n\t\t\t\t\t// you could also further analyze the input text and assign a type\n\t\t\t\t\t// that fits the input text, e.g.\n\t\t\t\t\t// e.Style.CellValueType = typeof(datetime);\n\t\t\t\t\t// - or - \n\t\t\t\t\t// e.Style.CellValueType = typeof(decimal);\n\t\t\t\t\t// etc.\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthrow;\n\t\t\t}\n\t\t\te.Handled = true;\n\t\t}\n        #endregion\n              \n        #region Word\n        private void buttonAdv1_Click(object sender, EventArgs e)\n        {\n                GridWordConverter converter = new GridWordConverter(true, true);\n                converter.DrawHeader += new GridWordConverterBase.DrawDocHeaderFooterEventHandler(converter_DrawHeader);\n                converter.DrawFooter += new GridWordConverterBase.DrawDocHeaderFooterEventHandler(converter_DrawFooter);\n                converter.GridToWord(\"Sample.doc\", gridControl1);\n#if !NETCORE\n            System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(\"Sample.doc\");\n            info.UseShellExecute = true;\n            System.Diagnostics.Process.Start(info);\n#else\n            ProcessStartInfo psi = new ProcessStartInfo\n            {\n                FileName = \"cmd\",\n                WindowStyle = ProcessWindowStyle.Hidden,\n                UseShellExecute = false,\n                CreateNoWindow = true,\n                Arguments = \"/c start Sample.doc\"\n            };\n            Process.Start(psi);\n#endif\n        }\n\n        void converter_DrawFooter(object sender, DocHeaderFooterEventArgs e)\n        {\n            e.Footer.AddParagraph().AppendText(\"Copyright 2001-2008\");\n        }\n\n        void converter_DrawHeader(object sender, DocHeaderFooterEventArgs e)\n        {\n            e.Header.AddParagraph().AppendText(\"Syncfusion Inc.\");\n        }\n\n#endregion\n        \n    }\n}\n"
    }
  ]
}