Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DataGrid Methods

The DataGrid type exposes the following members.

  Name Description
Public method AddHandler Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. Specify handledEventsToo as true to have the provided handler be invoked for routed event that had already been marked as handled by another element along the event route. (Inherited from UIElement.)
Public method ApplyTemplate Loads the relevant control template so that its parts can be referenced. (Inherited from Control.)
Public method Arrange Positions child objects and determines a size for a UIElement. Parent objects that implement custom layout for their child elements should call this method from their layout override implementations to form a recursive layout update. (Inherited from UIElement.)
Protected method ArrangeOverride Arranges the content of the DataGrid. (Overrides FrameworkElement.ArrangeOverride(Size).)
Public method BeginEdit() Causes the data grid to enter editing mode for the current cell and current row, unless the data grid is already in editing mode.
Public method BeginEdit(RoutedEventArgs) Causes the data grid to enter editing mode for the current cell and current row in the specified keyboard and mouse state.
Public method CancelEdit() Causes the data grid to cancel the current edit, restore the original value, and exit editing mode.
Public method CancelEdit(DataGridEditingUnit) Causes the data grid to cancel the current edit, restore the original value, and exit editing mode.
Public method CaptureMouse Sets mouse capture to a UIElement. (Inherited from UIElement.)
Public method CheckAccess Determines whether the calling thread has access to this object. (Inherited from DependencyObject.)
Public method ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject.)
Public method CollapseRowGroup Collapses data grid row groups.
Public method CommitEdit() Causes the data grid to commit the current edit to the data source and exit editing mode.
Public method CommitEdit(DataGridEditingUnit, Boolean) Causes the data grid to commit the current edit to the data source, and optionally exit editing mode.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExpandRowGroup Expands data grid row groups.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method FindName Retrieves an object that has the specified identifier name. (Inherited from FrameworkElement.)
Public method Focus Attempts to set the focus on the control. (Inherited from Control.)
Public method GetAnimationBaseValue Returns any base value established for a Silverlight dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
Public method GetBindingExpression Retrieves the BindingExpression for a dependency property where a binding is established. (Inherited from FrameworkElement.)
Public method GetGroupFromItem Gets the row group that the specified item belongs to.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Protected method GetTemplateChild Retrieves the named element in the instantiated ControlTemplate visual tree. (Inherited from Control.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
Public method InvalidateArrange Invalidates the arrange state (layout) for a UIElement. After the invalidation, the UIElement will have its layout updated, which will occur asynchronously. (Inherited from UIElement.)
Public method InvalidateMeasure Invalidates the measurement state (layout) for a UIElement. (Inherited from UIElement.)
Public method Measure Updates the DesiredSize of a UIElement. Typically, objects that implement custom layout for their layout children call this method from their own MeasureOverride implementations to form a recursive layout update. (Inherited from UIElement.)
Protected method MeasureOverride Measures the children of a DataGrid in preparation of arranging them during the ArrangeOverride pass. (Overrides FrameworkElement.MeasureOverride(Size).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnApplyTemplate Builds the visual tree for the DataGrid control when a new template is applied. (Overrides FrameworkElement.OnApplyTemplate().)
Protected method OnAutoGeneratingColumn Raises the AutoGeneratingColumn event.
Protected method OnBeginningEdit Raises the BeginningEdit event.
Protected method OnCellEditEnded Raises the CellEditEnded event.
Protected method OnCellEditEnding Raises the CellEditEnding event.
Protected method OnColumnDisplayIndexChanged Raises the ColumnDisplayIndexChanged event.
Protected method OnColumnReordered Raises the ColumnReordered event.
Protected method OnColumnReordering Raises the ColumnReordering event.
Protected method OnCopyingRowClipboardContent Raises the CopyingRowClipboardContent event.
Protected method OnCreateAutomationPeer Returns a DataGridAutomationPeer for use by the Silverlight automation infrastructure. (Overrides UIElement.OnCreateAutomationPeer().)
Protected method OnCurrentCellChanged Raises the CurrentCellChanged event.
Protected method OnDragEnter Called before the DragEnter event occurs. (Inherited from Control.)
Protected method OnDragLeave Called before the DragLeave event occurs. (Inherited from Control.)
Protected method OnDragOver Called before the DragOver event occurs. (Inherited from Control.)
Protected method OnDrop Called before the Drop event occurs. (Inherited from Control.)
Protected method OnGotFocus Called before the GotFocus event occurs. (Inherited from Control.)
Protected method OnKeyDown Called before the KeyDown event occurs. (Inherited from Control.)
Protected method OnKeyUp Called before the KeyUp event occurs. (Inherited from Control.)
Protected method OnLoadingRow Raises the LoadingRow event.
Protected method OnLoadingRowDetails Raises the LoadingRowDetails event.
Protected method OnLoadingRowGroup Raises the LoadingRowGroup event.
Protected method OnLostFocus Called before the LostFocus event occurs. (Inherited from Control.)
Protected method OnLostMouseCapture Called before the LostMouseCapture event occurs to provide handling for the event in a derived class without attaching a delegate. (Inherited from Control.)
Protected method OnMouseEnter Called before the MouseEnter event occurs. (Inherited from Control.)
Protected method OnMouseLeave Called before the MouseLeave event occurs. (Inherited from Control.)
Protected method OnMouseLeftButtonDown Called before the MouseLeftButtonDown event occurs. (Inherited from Control.)
Protected method OnMouseLeftButtonUp Called before the MouseLeftButtonUp event occurs. (Inherited from Control.)
Protected method OnMouseMove Called before the MouseMove event occurs. (Inherited from Control.)
Protected method OnMouseRightButtonDown Called before the MouseRightButtonDown event occurs. (Inherited from Control.)
Protected method OnMouseRightButtonUp Called before the MouseRightButtonUp event occurs. (Inherited from Control.)
Protected method OnMouseWheel Provides handling for the MouseWheel event. (Overrides Control.OnMouseWheel(MouseWheelEventArgs).)
Protected method OnPreparingCellForEdit Raises the PreparingCellForEdit event.
Protected method OnRowDetailsVisibilityChanged Raises the RowDetailsVisibilityChanged event.
Protected method OnRowEditEnded Raises the RowEditEnded event.
Protected method OnRowEditEnding Raises the RowEditEnding event.
Protected method OnSelectionChanged Raises the SelectionChanged event.
Protected method OnTextInput Called before the TextInput event occurs. (Inherited from Control.)
Protected method OnTextInputStart Called before the TextInputStart event occurs. (Inherited from Control.)
Protected method OnTextInputUpdate Called before the TextInputUpdate event occurs. (Inherited from Control.)
Protected method OnUnloadingRow Raises the UnloadingRow event.
Protected method OnUnloadingRowDetails Raises the UnloadingRowDetails event.
Protected method OnUnloadingRowGroup Raises the UnloadingRowGroup event.
Public method ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
Public method ReleaseMouseCapture Removes mouse capture from a UIElement. After this call, typically no object holds mouse capture. (Inherited from UIElement.)
Public method RemoveHandler Removes the specified routed event handler from this UIElement. (Inherited from UIElement.)
Public method ScrollIntoView Scrolls the DataGrid vertically to display the row for the specified data item and scrolls the DataGrid horizontally to display the specified column.
Public method SetBinding Attaches a binding to a FrameworkElement, using the provided binding object, and returns a BindingExpressionBase for possible later use. (Inherited from FrameworkElement.)
Public method SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TransformToVisual Returns a transform object that can be used to transform coordinates from the UIElement to the specified object. (Inherited from UIElement.)
Public method UpdateLayout Ensures that all positions of child objects of a UIElement are properly updated for layout. (Inherited from UIElement.)
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.