Spread allows you to copy width, height and style settings from a previous row/column whenever a new row/column is inserted in existing rows/columns. This feature works only when LegacyBehaviors.Style is excluded from LegacyBehaviors enum.
Copying of style and size settings applies only when a new row/column is inserted by following methods:
The following images illustrates that the inserted row has copied the size and style settings from previous row.
|
To insert new rows/columns using context menu at runtime, use the following code.
C# |
Copy Code
|
---|---|
// Context menu appears at runtime fpSpread1.ContextMenuStrip = new SpreadContextMenuStrip(); |
VB |
Copy Code
|
---|---|
' Context menu appears at runtime FpSpread1.ContextMenuStrip = New SpreadContextMenuStrip() |
For inserting new rows/columns using keyboard shortcut keys (Ctrl Shift +), you have to enable the ExcelCompatibleKeyboardShortcuts option. To do this, use the following code.
C# |
Copy Code
|
---|---|
// Excel compatible shortcut keys will be enabled at runtime fpSpread1.Features.ExcelCompatibleKeyboardShortcuts = true; |
VB |
Copy Code
|
---|---|
' Excel compatible shortcut keys will be enabled at runtime FpSpread1.Features.ExcelCompatibleKeyboardShortcuts = True |