GrapeCity MultiRow Windows Forms Documentation
Conversion from DataGridView

The layout of the DataGridView control can be converted to a GcMultiRow template at design time.

Converting the Template

The following steps convert the layout of the DataGridView control to a GcMultiRow template.

  1. Select the GcMultiRow control, and then select Convert DataGridView from the context menu (right-click menu).
    You will not be able to select Convert DataGridView in the context menu, if the DataGridView has not been placed on the form.
     
  2. The Convert DataGridView dialog is displayed.
  3. In Select a DataGridView, select the control you want to convert from the DataGridView controls placed on the form. You can set the Remove previous DataGridView and Open template after converting option items, if necessary.
  4. Click on the OK button to perform the conversion.

Rules for Conversion

The conversion from DataGridView is based on the following rules.

Properties After Conversion

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.
DataGridView GcMultiRow
DataGridViewColumn.Resizable DataGridView.ColumnHeadersHeightSizeMode ColumnHeaderCell.ResizeMode
True EnableResizing Both
True DisableResizing or AutoResize Horizontal
False EnableResizing Vertical
False DisableResizing or AutoResize None
SortMode ColumnHeaderCell.SortMode

Based on the condition, the following values are set for the ColumnHeaderCell.SortMode property after conversion.
DataGridViewColumn.SortMode ColumnHeaderCell.SortMode
NotSortable NotSortable
Programmatic Programmatic
Automatic Automatic

ColumnHeaderCell.SelectionMode property is set to None
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.
DataGridView GcMultiRow
DataGridViewComboBoxColumn.AutoComplete ComboBoxCell.AutoCompleteMode ComboBoxCell.AutoCompleteSource
True Append ListItems
False None None
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.
DataGridView GcMultiRow
DataGridViewComboBoxColumn.DisplayStyle DataGridViewComboBoxColumn. DisplayStyleForCurrentCellOnly ComboBoxCell.ShowDropDownButton
ComboBox or DropDownButton True ShowForCurrentCell
ComboBox or DropDownButton False ShowAlways
Nothing True or False NotShown
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.
DataGridView GcMultiRow
DataGridViewCellStyle.WrapMode CellStyle.WordWrap CellStyle.MultiLine
NotSet Inherit Inherit
True True True
False False False
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.
DataGridView.AutoSizeColumnsMode GcMultiRow.HorizontalAutoSizeMode
AllCells All
AllCellsExceptHeader AllCellsInRow
ColumnHeader CellsInColumnHeader
DisplayedCell DisplayedCellsInRow or CellsInColumnHeader
DisplayedCellsExceptHeader DisplayedCellsInRow
Fill None
None None
NotSet None
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:
DataGridView.CellBorderStyle Color of CellStyle.Border of GcMultiRow
If any of the following is set:
SingleCustom
Raised
Sunken
Color that is set to DataGridView.GridColor
None None
If any of the following is set:
SingleVertical
RaisedVertical
SunkenVertical
Color that is set to DataGridView.GridColor
The Top and Bottom of the border will be set to None.
If any of the following is set:
SingleHorizontal
RaisedHorizontal
SunkenHorizontal
Color that is set to DataGridView.GridColor
The Left and Right of the border will be set to None.
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.
DataGridView GcMultiRow
DataGridView.ClipboardCopyMode GcMultiRow.AllowClipBoard GcMultiRow.ClipboardCopyMode
Disabled False -
EnableWithAutoHeaderText True EnableWithHeaderText
EnableWithoutHeaderText True EnableWithoutHeaderText
EnableAlwaysIncludeHeaderText True EnableWithHeaderText
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.
DataGridView GcMultiRow
DataGridViewColumn.Resizable DataGridView.ColumnHeadersHeightSizeMode ColumnHeaderCell.ResizeMode
True EnableResizing Both
True DisableResizing or AutoResize Horizontal
False EnableResizing Vertical
False DisableResizing or AutoResize None
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.
DataGridView.EditMode GcMultiRow.EditMode
EditOnEnter EditOnEnter
EditProgramaticlly EditProgramaticlly
EditOnKeystroke EditOnKeystrokeOrShortcutKey
The EndEdit and BeginEdit actions are not assigned to any of the keys.
EditOnKeystrokeOfF2 EditOnKeystrokeOrShortcutKey
BeginEdit action is assigned to the F2 key.
EditOnF2 EditOnShortcutKey
BeginEdit action is assigned to the F2 key.
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:
DataGridView GcMultiRow
RowTemplate.Resizable RowHeadersWidthSizeMode RowHeaderCell.ResizeMode
True EnableResizing Both
True If any of the following is set:

DisableResizing
AutoSizeToAllHeaders
AutoSizeToDisplayedHeaders
AutoSizeToFirstHeader
Vertical
False EnableResizing Horizontal
False If any of the following is set:

DisableResizing
AutoSizeToAllHeaders
AutoSizeToDisplayedHeaders
AutoSizeToFirstHeader
None
NotSet - If RowTemplate.Resizable is NotSet, then the setting value of DataGridView.AllowUserToResizeRows is used instead of RowTemplate.Resizable.
The setting value after conversion, will have one of the four aforementioned patterns.
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.
DataGridView.StandardTab GcMultiRow.HorizontalAutoSizeMode
True Tab key: ComponentActions.NextControl
Shift + Tab key: ComponentAtions.PreviousControl
False Tab key: SelectionActions.MoveToNextCellThenControl
Shift@+@Tab key: SelectionActions.MoveToPreviousCellThenControl
TabIndex GcMultiRow.TabIndex
TabStop GcMultiRow.TabStop
Tag GcMultiRow.Tag
UseWaitCursor GcMultiRow.UseWaitCursor
VirtualMode GcMultiRow.VirtualMode
Visible GcMultiRow.Visible
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options