FlexSheet for WPF | ComponentOne
Customizing Appearance / Customizing Edit Options
In This Topic
    Customizing Edit Options
    In This Topic

    FlexSheet for WPF provides various edit options on a multi-tabbed spreadsheet control. The edit options are as follows:

    These edit options can be set using EditOptions property and are displayed when you right-click any sheet tab at run time. EditOptions property controls which context menu should be shown when you right-click on the tab strip.

    In Design View

    1. In Design view, select the FlexSheet control.
    2. Navigate to the Properties window and locate the EditOptions property in Miscellaneous drop-down section.
    3. Click the EditOptions drop-down menu and select the edit options you want to add in the context menu. By default, the EditOptions property is set to All. Here, we have selected Rename to only display rename option in the context menu.

      EditOptions property

    As you can see in the image, EditOptions has 8 values, None, Insert, Delete, Rename, Hide, Unhide, AllowDrag and All. These values are specified in FlexSheetEditOptions enum that defines the edit options.

    Note: The AllowDrag property does not appear in the context menu but once applied it allows you to drag or move sheets in tab strip.

    In XAML

    You can also customize the EditOptions appearing in the context menu by setting the EditOptions property in XAML View using the following code:

    XAML
    Copy Code
    <c1:C1FlexSheet x:Name="flexsheet1" BorderBrush="Gray" BorderThickness="1" 
                    Grid.Row="1" Width="1000"  HorizontalAlignment="Left" ShowSingleTab="False" EditOptions="Rename" />
    

    In Code

    You can choose to show the EditOptions context menu options using the following code:

    flexsheet1.EditOptions = FlexSheetEditOptions.Rename
    
    flexsheet1.EditOptions = FlexSheetEditOptions.Rename;