menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridModelOptions - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridModelOptions

    Provides properties that allow you to adjust behavior and appearance of the grid.

    Inheritance
    System.Object
    GridModelOptions
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Controls.Grid
    Assembly: Syncfusion.Grid.Wpf.dll
    Syntax
    public class GridModelOptions : INotifyPropertyChanged, IDisposable

    Constructors

    GridModelOptions()

    Intializes a new GridModelOptions.

    Declaration
    public GridModelOptions()

    Properties

    ActivateCurrentCellBehavior

    Specifies current cell activation behavior when moving the current cell or clicking inside a cell.

    Declaration
    public GridCellActivateAction ActivateCurrentCellBehavior { get; set; }
    Property Value
    Type Description
    GridCellActivateAction

    A GridCellActivateAction enumeration that defines when to set the focus / toggle edit mode for the current cell.

    AllowExcelLikeResizing

    Allows user to resize Hidden columns and hidden rows as in Excel.

    Declaration
    public bool AllowExcelLikeResizing { get; set; }
    Property Value
    Type
    System.Boolean

    AllowSelection

    Defines selection behavior of the grid.

    Declaration
    public GridSelectionFlags AllowSelection { get; set; }
    Property Value
    Type Description
    GridSelectionFlags

    A GridSelectionFlags that specifies options to be applied.

    Remarks

    You can customize the mouse controller's behavior at run-time while the user is performing the action by subscribing to the SelectionChanging and SelectionChanged events.

    The property lets you decide which mouse buttons can be used for selecting cells.

    AllowSelectionOnMouseUp

    Declaration
    public bool AllowSelectionOnMouseUp { get; set; }
    Property Value
    Type
    System.Boolean

    AllowTextSelectionOnReadOnly

    Declaration
    public bool AllowTextSelectionOnReadOnly { get; set; }
    Property Value
    Type
    System.Boolean

    ColumnSizer

    User Choice for how the column can be sized

    Declaration
    public GridControlLengthUnitType ColumnSizer { get; set; }
    Property Value
    Type
    GridControlLengthUnitType

    CopyPasteOption

    User Choice for how the clipboard operation is performed

    Declaration
    public CopyPaste CopyPasteOption { get; set; }
    Property Value
    Type
    CopyPaste

    CurrentCellBorder

    Specifies a brush for current cell border.

    Declaration
    public Brush CurrentCellBorder { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    CurrentCellBorderWidth

    Specifies a width for current cell border.

    Declaration
    public double CurrentCellBorderWidth { get; set; }
    Property Value
    Type
    System.Double

    DataObjectConsumerOptions

    Declaration
    public GridDataObjectConsumerOptions DataObjectConsumerOptions { get; set; }
    Property Value
    Type
    GridDataObjectConsumerOptions

    DragDropDropTargetFlags

    Declaration
    public GridDragDropFlags DragDropDropTargetFlags { get; set; }
    Property Value
    Type
    GridDragDropFlags

    DrawSelectionOptions

    Controls the appearance of the selection drawing.

    Declaration
    public GridDrawSelectionOptions DrawSelectionOptions { get; set; }
    Property Value
    Type
    GridDrawSelectionOptions

    EnableFloatingCell

    Declaration
    public bool EnableFloatingCell { get; set; }
    Property Value
    Type
    System.Boolean

    EnterKeyBehaviour

    Declaration
    public EnterKeyBehaviour EnterKeyBehaviour { get; set; }
    Property Value
    Type
    EnterKeyBehaviour

    ExcelLikeCurrentCell

    Defines Excel-like current cell behavior. When the user moves the current cell out of a selected range, the range will be cleared. If the user moves the current cell inside a selected range, the range will stay.

    Declaration
    public bool ExcelLikeCurrentCell { get; set; }
    Property Value
    Type
    System.Boolean

    ExcelLikeFreezePane

    Declaration
    public bool ExcelLikeFreezePane { get; set; }
    Property Value
    Type
    System.Boolean

    ExcelLikeSelection

    Defines Excel-like selection behavior. Prevents the user from doing multi selection when the current cell in Edit Mode.

    Declaration
    public bool ExcelLikeSelection { get; set; }
    Property Value
    Type
    System.Boolean

    ExcelLikeSelectionFrame

    Specifies whether the active selection should be outline with a selection frame.

    Declaration
    public bool ExcelLikeSelectionFrame { get; set; }
    Property Value
    Type
    System.Boolean

    ExcelLikeTabNavigation

    It will enable or disable the Excel like tab key navigation

    Declaration
    public bool ExcelLikeTabNavigation { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if set to true then skips the read only cells move to the next enabled cell; otherwise, move to the next cell false.

    FloatCellMode

    Declaration
    public GridFloatCellsMode FloatCellMode { get; set; }
    Property Value
    Type
    GridFloatCellsMode

    FloodCell

    Declaration
    public bool FloodCell { get; set; }
    Property Value
    Type
    System.Boolean

    FormulaDisplayBehavior

    Defines when formulas are visible in a formula cell.

    Declaration
    public GridShowFormulaBehavior FormulaDisplayBehavior { get; set; }
    Property Value
    Type
    GridShowFormulaBehavior
    Remarks

    You can use this property to always hide formulas from your user, to always show formulas to your user, or only show them in a particular cell when it is either current or being edited.

    HiddenBorderBrush

    Specifies the brush of the line to be drawn at the border to indicate any hidden columns/rows

    Declaration
    public Brush HiddenBorderBrush { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    HiddenBorderThickness

    Specifies the thickness of the line to be drawn at the border to indicate any hidden columns/rows

    Declaration
    public double HiddenBorderThickness { get; set; }
    Property Value
    Type
    System.Double

    HighlightSelectionAlphaBlend

    Specifies the alphablend brush used to highlight the selection.

    Declaration
    public Brush HighlightSelectionAlphaBlend { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    HighlightSelectionBackground

    Specifies a background brush for highlighting the selection.

    Declaration
    public Brush HighlightSelectionBackground { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    highlightSelectionBackgroundChanged

    Specifies wheather SelectionBackground changed or not.

    Declaration
    public bool highlightSelectionBackgroundChanged { get; set; }
    Property Value
    Type
    System.Boolean

    HighlightSelectionBorder

    Specifies a border brush for highlighting the selection.

    Declaration
    public Brush HighlightSelectionBorder { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    HighlightSelectionBorderWidth

    Specifies a width for highlight selection border.

    Declaration
    public double HighlightSelectionBorderWidth { get; set; }
    Property Value
    Type
    System.Double

    HighlightSelectionForeground

    Specifies a foreground brush for highlighting the selection.

    Declaration
    public Brush HighlightSelectionForeground { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    highlightSelectionForegroundChanged

    Specifies wheather HighlightSelectionForeground was changed or not.

    Declaration
    public bool highlightSelectionForegroundChanged { get; set; }
    Property Value
    Type
    System.Boolean

    ListBoxModeAllowUIElementClick

    Gets or sets whether child UIElements in cells should receive mouse events when list box-like selection behavior is enabled for the grid. Set this true if you want to place buttons or checkboxes in cells.

    Declaration
    public bool ListBoxModeAllowUIElementClick { get; set; }
    Property Value
    Type
    System.Boolean

    ListBoxSelectionMode

    Enables list box-like selection behavior for the grid when the user moves the current cell.

    Declaration
    public GridSelectionMode ListBoxSelectionMode { get; set; }
    Property Value
    Type Description
    GridSelectionMode

    A GridSelectionMode that defines the list box-like selection behavior of the grid.

    MaxLength

    Gets / Sets the max length for computing auto sizing range. Default value is 1000.

    Declaration
    public int MaxLength { get; set; }
    Property Value
    Type
    System.Int32

    ScrollFrozen

    Defines scroll behavior when user moves current cell with arrow keys into the frozen cells area.

    Declaration
    public bool ScrollFrozen { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    True, if current cell is at the topmost nonfrozen row, scroll the view. False, move current cell into frozen cells. If current cell is at the top row, scroll the view.

    ShowCurrentCell

    Specifies whether to hide or show the current cell.

    Declaration
    public bool ShowCurrentCell { get; set; }
    Property Value
    Type Description
    System.Boolean

    True to outline the current cell; false otherwise.

    ShowErrorIconOnEditing

    Gets / sets ErrorIcon at Editing time.

    Declaration
    public bool ShowErrorIconOnEditing { get; set; }
    Property Value
    Type
    System.Boolean

    WrapCell

    Go to first column in next row or last column in previous row when at end or beginning of a row and moving left or right. For more options, use WrapCellBehavior instead.

    Declaration
    public bool WrapCell { get; set; }
    Property Value
    Type
    System.Boolean

    WrapCellBehavior

    Go to first column in next row or last column in previous row when at end or beginning of a row and moving left or right.

    Declaration
    public GridWrapCellBehavior WrapCellBehavior { get; set; }
    Property Value
    Type
    GridWrapCellBehavior

    Methods

    Dispose()

    Declaration
    public void Dispose()

    Events

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved