Ever try to mimic Microsoft™ Excel™ features in your WinGrid powered application? Well now as of NetAdvantage 2011.2 volume release, there is one more feature added to WinGrid that you can just implement by the use of a property. This is called WinGrid Repetitive Paste.
Typically when you copy a selection in WinGrid into your clipboard (learn more about WinGrid Clipboard Operations), you can paste the selection to a destination of the same size. With the new WinGrid Repetitive Paste feature, you can now select a region that is LARGER than the original selection and your paste will duplicate across the larger selection. The target destination must be a multiple of the original selection so that the paste can repeat completely each time.
So how do you take advantage of this new feature? Easy, follow these steps:
- Enable clipboard operations by assigning any one or any combination of enumeration bit mask values to the following WinGrid property:
- this.ultraGrid1.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.All;
- Run your WinGrid application and select one data cell.
- Press the keyboard combination Control + C
- Create a destination selection on WinGrid. Since we copied only one cell, we can paste to a target of many cells. If we copied more than one cell (E.g., 2), then we would have to create a target selection that is a multiple of that selection (E.g., 2, 4, 6, etc).
- Press keyboard combination Control + V
- That’s it! This is how you set up and enable WinGrid Repetitive Paste!