WinGrid Repetitive Paste

Tom Puglisi / Monday, November 14, 2011

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:

  1. Enable clipboard operations by assigning any one or any combination of enumeration bit mask values to the following WinGrid property:

    1. this.ultraGrid1.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.All;   


  2. Run your WinGrid application and select one data cell.
  3. Press the keyboard combination Control + C
  4. 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).
  5. Press keyboard combination Control + V
  6. That’s it! This is how you set up and enable WinGrid Repetitive Paste!