| MultiRow Windows Forms > Developer's Guide > Using MultiRow > Advanced Designer Features > Conversion from DataGridView |
The layout of the DataGridView control can be converted to a GcMultiRow template at design time.
The following steps convert the layout of the DataGridView control to a GcMultiRow template.
![]() |
You will not be able to select Convert DataGridView in the context menu, if the DataGridView has not been placed on the form. |
The conversion from DataGridView is based on the following rules.
When you convert the DataGridView, the properties are converted to the following:
| DataGridView | GcMultiRow | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DataGridViewColumn Class | ||||||||||||||||||||||
| Name | Cell.Name | |||||||||||||||||||||
| AutoSizeMode | - | |||||||||||||||||||||
| ColumnType | - | |||||||||||||||||||||
| DataPropertyName | Cell.DataField | |||||||||||||||||||||
| DefaultCellStyle | Cell.Style | |||||||||||||||||||||
| DividerWidth | - | |||||||||||||||||||||
| FillWeight | - | |||||||||||||||||||||
| Frozen | GcMultiRow.FreezeLeftCellIndex | |||||||||||||||||||||
| MinimumWidth | Cell.MinimumSize.Width | |||||||||||||||||||||
| ReadOnly | Cell.ReadOnly | |||||||||||||||||||||
| DataGridViewColumn.Resizable and DataGridView.ColumnHeadersHeightSizeMode | ColumnHeaderCell.ResizeMode Based on the condition, the following values are set for the ColumnHeaderCell.ResizeMode property after conversion.
| |||||||||||||||||||||
| SortMode | ColumnHeaderCell.SortMode Based on the condition, the following values are set for the ColumnHeaderCell.SortMode property after conversion.
| |||||||||||||||||||||
| ToolTipText | Cell.ToolTipText | |||||||||||||||||||||
| Visible | - | |||||||||||||||||||||
| Width | Cell.Width | |||||||||||||||||||||
| DataGridViewTextBoxColumn class | ||||||||||||||||||||||
| MaxInputLength | TextBoxCell.MaxLength | |||||||||||||||||||||
| DataGridViewButtonColumn class | ||||||||||||||||||||||
| FlatStyle | ButtonCell.FlatStyle | |||||||||||||||||||||
| Text | If the DataGridViewButtonColumn.UseColumnTextForButtonValue property is set to True, it is converted to the ButtonCell.Value property; otherwise, the DataGridViewButtonColumn.Text property is ignored. | |||||||||||||||||||||
| UseColumnTextForButtonValue | - | |||||||||||||||||||||
| DataGridViewCheckBoxColumn class | ||||||||||||||||||||||
| - | The CheckBoxCell.CheckAlign property is set to MiddleCenter. | |||||||||||||||||||||
| FalseValue | CheckBoxCell.FalseValue | |||||||||||||||||||||
| FlatStyle | CheckBoxCell.FlatStyle | |||||||||||||||||||||
| IndeterminateValue | CheckBoxCell.IndeterminateValue | |||||||||||||||||||||
| ThreeState | CheckBoxCell.ThreeState | |||||||||||||||||||||
| TrueValue | CheckBoxCell.TrueValue | |||||||||||||||||||||
| DataGridViewComboBoxColumn class | ||||||||||||||||||||||
| AutoComplete | ComboBoxCell.AutoCompleteMode and ComboBoxCell.AutoCompleteSource Depending on the value of the DataGridViewComboBoxColumn.AutoComplete property, the ComboBoxCell.AutoCompleteMode property and the ComboBoxCell.AutoCompleteSource property, are set to the following values.
| |||||||||||||||||||||
| DisplayMember | ComboBoxCell.DisplayMember | |||||||||||||||||||||
| DisplayStyle and DisplayStyleForCurrentCellOnly | ComboBoxCell.ShowDropDownButton Depending on the DataGridViewComboBoxColumn.DisplayStyle property and the DataGridViewComboBoxColumn. DisplayStyleForCurrentCellOnly, the ComboBoxCell.ShowDropDownButton property is set to the following values.
| |||||||||||||||||||||
| DropDownWidth | ComboBoxCell.DropDownWidth | |||||||||||||||||||||
| FlatStyle | ComboBoxCell.FlatStyle | |||||||||||||||||||||
| Items | ComboBoxCell.Items | |||||||||||||||||||||
| MaxDropDownItems | ComboBoxCell.MaxDropDownItems | |||||||||||||||||||||
| Sorted | ComboBoxCell.Sorted | |||||||||||||||||||||
| ValueMember | ComBoxCell.ValueMember | |||||||||||||||||||||
| DataGridViewImageColumn class | ||||||||||||||||||||||
| Description | - | |||||||||||||||||||||
| ImageLayout | ImageCell.Layout If the DataGridViewImageColumn.ImageLayout property is NotSet, the ImageCell.Layout property is set to ImageCellLayout.Normal. | |||||||||||||||||||||
| DataGridViewLinkColumn class | ||||||||||||||||||||||
| ActiveLinkColor | LinkLabelCell.ActiveLinkColor | |||||||||||||||||||||
| LinkBehavior | LinkLabelCell.LinkBehavior | |||||||||||||||||||||
| LinkColor | LinkLabelCell.LinkColor | |||||||||||||||||||||
| Text | If the DataGridViewLinkColumn.UseColumnTextForLinkValue property is set to True, it is converted to the LinkLabelCell.Value property; otherwise, the DataGridViewLinkColumn.Text property is ignored. | |||||||||||||||||||||
| TrackVisitedState | LinkLabelCell.TrackVisitedState | |||||||||||||||||||||
| UseColumnTextForLinkValue | - | |||||||||||||||||||||
| VisitedLinkColor | LinkLabelCell.VisitedLinkColor | |||||||||||||||||||||
| DataGridViewCellStyle class | ||||||||||||||||||||||
| NullValue | CellStyle.NullValue | |||||||||||||||||||||
| Format | CellStyle.Format | |||||||||||||||||||||
| Alignment | CellStyle.TextAlign | |||||||||||||||||||||
| Padding | CellStyle.Padding | |||||||||||||||||||||
| WrapMode | CellStyle.WordWrap and CellStyle.MultiLine Based on the setting of the DataGridViewCellStyle.WrapMode property, the CellStyle.WordWrap property and CellStyle.MultiLine property are set to the following values.
| |||||||||||||||||||||
| BackColor | CellStyle.BackColor | |||||||||||||||||||||
| Font | CellStyle.Font | |||||||||||||||||||||
| ForeColor | CellStyle.ForeColor | |||||||||||||||||||||
| SelectionBackColor | CellStyle.SelectionBackColor | |||||||||||||||||||||
| SelectionForeColor | CellStyle.SelectionForeColor | |||||||||||||||||||||
| DataGridView class | ||||||||||||||||||||||
| Name | - | |||||||||||||||||||||
| AccessibleDescription | GcMultiRow.AccessibleDescription | |||||||||||||||||||||
| AccessibleName | GcMultiRow.AccessibleName | |||||||||||||||||||||
| AccessibleRole | GcMultiRow.AccessibleRole | |||||||||||||||||||||
| AllowDrop | GcMultiRow.AllowDrop | |||||||||||||||||||||
| AllowUserToAddRows | GcMultiRow.AllowUserToAddRows | |||||||||||||||||||||
| AllowUserToDeleteRows | GcMultiRow.AllowUserToDeleteRows | |||||||||||||||||||||
| AllowUserToOrderColumns | - | |||||||||||||||||||||
| AllowUserToResizeRows and AllowUserToResizeColumns | GcMultiRow.AllowUserToResize If the DataGridView.AllowUserToResizeRows property and the DataGridView.AllowUserToResizeColumns property are both set to False, the GcMultiRow.AllowUserToResize property is set to False; otherwise, the GcMultiRow.AllowUserToResize property is set to True. | |||||||||||||||||||||
| AlternatingRowsDefaultCellStyle | GcMultiRow.AlternatingRowsDefaultCellStyle | |||||||||||||||||||||
| Anchor | GcMultiRow.Anchor | |||||||||||||||||||||
| AutoSizeColumnsMode | GcMultiRow.HorizontalAutoSizeMode Based on the condition, the GcMultiRow.HorizontalAutoSizeMode property after conversion, is set to the following values.
| |||||||||||||||||||||
| AutoSizeRowsMode | - | |||||||||||||||||||||
| BackgroundColor | GcMultiRow.BackColor | |||||||||||||||||||||
| BorderStyle | GcMultiRow.BorderStyle | |||||||||||||||||||||
| CausesValidation | GcMultiRow.CausesValidation | |||||||||||||||||||||
| CellBorderStyle | Based on the condition, the color of CellStyle.Border of GcMultiRow after conversion, is set to the following values:
| |||||||||||||||||||||
| ClipboardCopyMode | GcMultiRow.AllowClipBoard and GcMultiRow.ClipboardCopyModeM Based on the condition, the GcMultiRow.AllowClipBoard property and GcMultiRow.ClipboardCopyMode property after conversion, are set to the following values.
| |||||||||||||||||||||
| ColumnHeadersBorderStyle | - | |||||||||||||||||||||
| ColumnHeadersDefaultCellStyle | GcMultiRow.ColumnHeadersDefaultHeaderCellStyle | |||||||||||||||||||||
| ColumnHeadersHeight | ColumnHeaderSection.Height | |||||||||||||||||||||
| Resizable and ColumnHeadersHeightSizeMode | ColumnHeaderCell.ResizeMode Based on the condition, the ColumnHeaderCell.ResizeMode property after conversion, is set to the following values.
| |||||||||||||||||||||
| ColumnHeadersVisible | ColumnHeaderSection.Visible | |||||||||||||||||||||
| Columns | GcMultiRow.Template | |||||||||||||||||||||
| ContextMenuStrip | GcMultiRow.ContextMenuStrip | |||||||||||||||||||||
| Cursor | GcMultiRow.Cursor | |||||||||||||||||||||
| DataMember | GcMultiRow.DataMember | |||||||||||||||||||||
| DataSoruce | GcMultiRow.DataSource | |||||||||||||||||||||
| DefaultCellStyle | GcMultiRow.DefaultCellStyle | |||||||||||||||||||||
| Dock | GcMultiRow.Dock | |||||||||||||||||||||
| EditMode | GcMultiRow.EditMode Based on the condition, the GcMultiRow.EditMode property after conversion, is set to the following values.
| |||||||||||||||||||||
| Enabled | GcMultiRow.Enabled | |||||||||||||||||||||
| EnableHeadersVisualStyles | - | |||||||||||||||||||||
| - | GcMultiRow.FreezeLines property is set to Line.Empty. | |||||||||||||||||||||
| GenerateMember | - | |||||||||||||||||||||
| GridColor | Cell.Border.Line.Color | |||||||||||||||||||||
| ImeMode | GcMultiRow.DefaulCellStyle.ImeMode | |||||||||||||||||||||
| Location | In case the DataGridView is deleted at the time of conversion, it is set to GcMultiRow.Location. Nothing else is done. | |||||||||||||||||||||
| Locked | - | |||||||||||||||||||||
| Margin | GcMultiRow.Margin | |||||||||||||||||||||
| MaximumSize | GcMultiRow.MaximumSize | |||||||||||||||||||||
| MinimumSize | GcMultiRow.MinimumSize | |||||||||||||||||||||
| Modifiers | - | |||||||||||||||||||||
| MultiSelect | GcMultiRow.MultiSelect | |||||||||||||||||||||
| ReadOnly | GcMultiRow.ReadOnly | |||||||||||||||||||||
| RightToLeft | - | |||||||||||||||||||||
| RowHeadersBorderStyle | - | |||||||||||||||||||||
| RowHeadersDefaultCellStyle | GcMultiRow.RowsDefaultHeaderCellStyle | |||||||||||||||||||||
| RowHeadersVisible | - | |||||||||||||||||||||
| RowHeadersWidth | RowHeaderCell.Width | |||||||||||||||||||||
| RowTemplate.Resizable and RowHeadersWidthSizeMode | RowHeaderCell.ResizeMode Based on the condition, the RowHeaderCell.ResizeMode property after conversion, is set to the following values:
| |||||||||||||||||||||
| ScrollBars | GcMultiRow.ScrollBars | |||||||||||||||||||||
| - | The GcMultiRow.ScrollBarMode property is set to Automatic. | |||||||||||||||||||||
| SelectionMode | If the DataGridView.SelectionMode property is FullRowSelect, the GcMultiRow.ViewMode property is set to ViewMode.Row; otherwise, ViewMode.Default is set. | |||||||||||||||||||||
| ShowCellErrors | GcMultiRow.ShowCellErrors | |||||||||||||||||||||
| ShowCellToolTips | GcMultiRow.ShowCellToolTips | |||||||||||||||||||||
| ShowEditingIcon | GcMultiRow.ShowEditingIcon | |||||||||||||||||||||
| ShowRowErrors | GcMultiRow.ShowRowErrors | |||||||||||||||||||||
| Size | GcMultiRow.Size | |||||||||||||||||||||
| StandardTab | Based on the condition, the following actions are assigned to the Tab and Shift + Tab keys of GcMultiRow after conversion.
| |||||||||||||||||||||
| TabIndex | GcMultiRow.TabIndex | |||||||||||||||||||||
| TabStop | GcMultiRow.TabStop | |||||||||||||||||||||
| Tag | GcMultiRow.Tag | |||||||||||||||||||||
| UseWaitCursor | GcMultiRow.UseWaitCursor | |||||||||||||||||||||
| VirtualMode | GcMultiRow.VirtualMode | |||||||||||||||||||||
| Visible | GcMultiRow.Visible | |||||||||||||||||||||