Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RemarksUXGridView provides a flexible way to display a collection of data in rows and columns. The built-in column types include a text box column, a check box column, combo box column and template column for hosting custom content. The built-in row type includes a drop-down details section that you can use to display additional content below the cell values. To bind UXGridView to data, set the ItemsSource property to an object that implements IEnumerable. Each row in the UXGridView is bound to an object in the data source, and each column in the UXGridView is bound to a property of the data object. In order for the UXGridView user interface to update automatically when items are added to or removed from the source data, UXGridView must be bound to a collection that implements INotifyCollectionChanged, such as an ObservableCollection<T>. In addition, for the user interface to automatically reflect property changes, the objects in the source collection must implement the INotifyPropertyChanged interface. The following code shows a simple UXGridView with data binding in XAML.
For more information about UXGridView, see UXGridView Overview. ExampleThe following code shows a simple UXGridView with data binding in XAML.
Working with AutoGenerateColumns Property and Columns PropertyBy default, the UXGridView control generates columns automatically when you set the ItemsSource property. The generated columns are of type UXGridViewCheckBoxColumn for bound Boolean (and nullable Boolean) properties, and of type UXGridViewTextColumn for all other properties. If a property does not have a string or numeric value type, the generated text box columns are read-only and display the data object's ToString value. You can prevent automatic column generation by setting the AutoGenerateColumns property to false. This is useful when you want to create and configure all columns explicitly. Alternatively, you can let the data grid generate the columns, but handle the AutoGeneratingColumn event to customize columns after they are instantiated. To rearrange the display order of the columns, you can set the DisplayIndex property to the desired value for each individual column. Generated columns recognize the DisplayAttribute if it is present on the source object. The DisplayAttribute.ShortName property is used to specify column header text. The DisplayAttribute.Order property is used to specify the order in which columns appear. The DisplayAttribute.AutoGenerateField property is used to specify whether the field has a column generated for it. Regardless of how you generate the columns, you can access the Columns collection to programmatically add, insert, remove, and change any columns in the control at run time. Alternatively, you can specify columns in XAML, in which case you should set AutoGenerateColumns to false. Creating your own columns enables you to use additional column types, such as the UXGridViewCheckBoxColumn, UXGridViewExpanderColumn, UXGridViewSelectColumn, UXGridViewTemplateColumn or other custom column type that inherited from UXGridViewColumn. The following list describes the built-in column types available in UXGridView.
Working with CanUserAddRows Property, CanUserDeleteRows Property and CanUserEditRows PropertyData editing in UXGridView involves three fundamental processes, Create, Update and Delete (CUD). You can enable each editing feature by setting the property CanUserAddRows, CanUserEditRows and CanUserDeleteRows respectively.
A NewRow element will appear in the top of the UXGridView user interface when you set the CanUserAddRows property to true, such as shown in the following illustration. In addition, you can also delete and edit the selected item by setting both the CanUserEditRows and CanUserDeleteRows properties to true. Working with CanUserExport PropertyTo enable data exporting in UXGridView, you simply set the CanUserExport property of UXGridView to true. When enabled, an Export dropdown button will appear in the status bar element of UXGridView. You can also select the format of the exported results from the context menu as shown in the figure above. The supported export format are:
Furthermore, you can also customize which element to export through the provided ExportOptions property. The following code shows how to include column footers and group footers in the data export results.
Working with CanUserGroupColumns Property
Working with CanUserPage PropertyTo enable data sorting in UXGridView, you set the CanUserPage property to true and the PageSize property to the number of records per page in UXGridView.
When enabled, a data pager user interface will appear in the status bar element of UXGridView. Depending on the QueryOperation property, the data paging can be handled in either client or server side. Working with CanUserSortColumns PropertyTo enable data sorting in UXGridView, you set the CanUserSortColumns property of UXGridView to true. If you prefer to enable sorting only on certain columns, set the CanUserSort property of the UXGridColumn to true.
Depending on the value of the QueryOperation property, the data sorting can be handled in either client or server side. Working with CellEditingTemplateSelector PropertyA rather unique scenario is where the users would like to have different editing control for the same column that depends on the data that currently being edited. This can be achieved elegantly in UXGridView by using CellEditingTemplateSelector. It works similarly to any other template selectors. The following code shows how to create the editing template selector and used it in UXGridView.
Working with ColumnFooterVisibility Property
Working with DeleteRowCommand Property, InsertRowCommand Property, PrepareNewRowCommand Property, RejectChangesCommand Property, RejectRowCommand Property, SaveChangesCommand Property, UpdateCellCommand Property, UpdateRowCommand Property and ValidateRowCommand PropertyTo handle the CUD operation, UXGridView provides several command-related properties that you can bind to your ViewModel to execute a method depending on the actions. These command-related properties are listed as follows:
You need to bind these command properties to your ViewModel and handle each of the action. Beside these command, UXGridView also provide HasChanges that you can use to determine whether there are existing changes in the data. The following code example shows how to define and bind the editing commands from ViewModel to UXGridView.
Working with EditEnterKeyAction Property, EditKeyGesture Property and EnterKeyAction PropertyThe keyboard gesture is determined by several properties such as EditKeyGesture, EnterKeyAction and EditEnterKeyAction. Each property has specific action that you can customize. The following list details the action of each property. EditEnterKeyAction:
EditKeyGesture:
EnterKeyAction:
Working with EditMouseGesture PropertyThe mouse gesture is determined by the EditMouseGesture property. The following options are available to customize the edit mouse gesture.
Working with EmptyRowsVisibility Property and NewRowPosition PropertyThe rows of UXGridView are determined by the number of items specified in items source. If the number of items in items source is less than the available screen estate it will show blank white space. Setting the EmptyRowsVisibility to Visible enables UXGridView to show empty rows in this blank white space area, to give a better look and feel. When CanUserAddRows is enabled and EmptyRowsVisibility is set to Visible, you can change the new row position to bottom through NewRowPosition property.
Working with ExpandedItem PropertyWhen you expand the row details using any of the methods described above, the ExpandedItem property will be set to the data context of the expanded row. You can use this property for more advanced user interaction, such as displaying a hierarchical grid view. The following code shows how to create hierarchical grid view using row details.
The above code shows how to define the row details to create hierarchical grid view and bind the ExpandedItem property to the ViewModel. In the ViewModel, you write a custom logic to load the child data whenever the ExpandedItem property is set.
Working with ExportCommand Property and ExportItems PropertyBy default, the exporting processes only the data available in the client. Therefore if you enable server paging, you might not be able to export the complete data correctly. To address this challenge, you can implement the ExportCommand in the ViewModel and provide the desired data to the ExportItems property. The following code shows you how to bind ExportItems and ExportCommand in the ViewModel and supply the data to export.
Working with FrozenColumnCount Property
Working with GroupByBoxVisibility PropertyAlternatively, you can also drag the header of a column to the group box. The group box's visibility can also be toggled from the column's context menu. It can be displayed initially by setting the GroupByBoxVisibility to Visible. Working with GroupDescriptors Property
Working with GroupFootersVisibility Property
Working with IsReadOnlyBinding PropertyThe following code shows how to implement the IsReadOnlyBinding to achieve the above scenario.
Working with ScrollIndicatorBinding PropertyThe following code shows how to use the ScrollIndicatorBinding to customize the data display in the scroll indicator element.
Working with SelectedItem Property, SelectedItems Property, SelectionMode Property and SelectionUnit PropertyUXGridView has three type of SelectionMode that you can choose from.
When a row is selected, the SelectedItem and SelectedItems property will be automatically synchronized. You can bind these properties to your ViewModel to capture the currently selected items. Furthermore, you can also customize the SelectionUnit to one of the possible three values: Row, Cell or RowAndCell. Working with SortDescriptions PropertyThe following example shows how to implement predefined sorting with client data operation.
|
...
The following table summarizes the members exposed in this class.
Public Constructors
UXGridView Constructor() | Initializes a new instance of UXGridView class. |
Public Properties
AlternatingRowBackground | Gets or sets the Brush that is used to paint the background of odd-numbered rows. |
AreRowDetailsFrozen | Gets or sets a value that indicates whether the row details sections remain fixed at the width of the display area or can scroll horizontally. |
AreRowGroupHeadersFrozen | Gets or sets a value that indicates whether the row group header sections remain fixed at the width of the display area or can scroll horizontally. |
AutoEditOperation | Gets or sets a value that indicates whether UXGridView should try perform IEditableCollectionView.CommitEdit or IEditableObject.EndEdit after each data editing operation. |
AutoFocusOnError | Gets or sets a value that indicates whether UXGridView should auto focus on cell when there is validation error. |
AutoGenerateColumns | Gets or sets a value that indicates whether columns are created automatically when the ItemsSource property is set. |
BusyLatency | Gets or sets the latency, in seconds, before the busy indicator is displayed when IsBusy is set to true. |
BusyOverlayBackground | Gets or sets the brush to apply to the overlay background. |
CanUserAddRows | Gets or sets a value that indicates whether the user can add new rows. |
CanUserBatchUpdate | Gets or sets a value that indicates whether the UXGridView can perform batch update. |
CanUserDeleteRows | Gets or sets a value that indicates whether the user can delete rows. |
CanUserEditRows | Gets or sets a value that indicates whether the user can edit rows. |
CanUserExport | Gets or sets a value that indicates whether the user can export data. |
CanUserFilterColumns | Gets or sets a value that indicates whether the user can filter data based on columns. |
CanUserGroupColumns | Gets or sets a value that indicates whether the user can group columns |
CanUserPage | Gets or sets a value that indicates whether the user can paging the data. |
CanUserReorderColumns | Gets or sets a value that indicates whether the user can change the column display order by dragging column headers with the mouse. |
CanUserResizeColumns | Gets or sets a value that indicates whether the user can adjust column widths using the mouse. |
CanUserSortColumns | Gets or sets a value that indicates whether the user can sort columns by clicking the column header. |
CellBusyTemplate | Gets or sets the template selector that is used to display the busy indicator for cell. |
CellEditingTemplateSelector | Gets or sets the template selector that is used to display the contents of a cell that is in editing mode. |
CellStyle | Gets or sets the style that is used when rendering the gridview cells. |
CellStyleSelector | Gets or sets the style selector that is used when rendering the gridview cells. |
CellTemplateSelector | Gets or sets the template selector that is used when rendering the gridview cells. |
CheckedItems | Gets or sets the checked items. |
ClipboardCopyMode | Gets or sets a value that indicates how data is copied to the clipboard. |
ColumnFooterCellStyle | Gets or sets the style that is used when rendering the gridview column footer cell. |
ColumnFooterCellStyleSelector | Gets or sets the style selector that is used when rendering the gridview column footer cell. |
ColumnFooterStyle | Gets or sets the style that is used when rendering the gridview column footer. |
ColumnFooterVisibility | Gets or sets a value that determines whether the column footer is visible. |
ColumnHeaderHeight | Gets or sets the height of the column headers row. |
ColumnHeaderStyle | Gets or sets the style that is used when rendering the column headers. |
ColumnHeaderStyleSelector | Gets or sets the style selector that is used when rendering the column headers. |
ColumnHeaderTemplateSelector | Gets or sets the template selector that is used when rendering the column headers. |
ColumnHeaderVisibility | Gets or sets a value that determines whether the column header is visible. |
Columns | Gets a collection that contains all the columns in the control. |
ColumnWidth | Gets or sets the standard width or automatic sizing mode of columns in the control. |
ContextMenuStyle | Gets or sets the style that is used when rendering the context menu element. |
CornerRadius | Represents the radius of a border's corner. The radius can't be negative. |
CurrentColumn | Gets or sets the column that contains the current cell. |
DeleteRowCommand | Gets or sets command that will be invoked when deleting a row. |
DoubleClickCommand | Gets or sets the command that will be invoked when validating a row. |
DragIndicatorStyle | Gets or sets the style that is used when rendering the drag indicator that is displayed while dragging column headers. |
DropLocationIndicatorStyle | Gets or sets the style that is used when rendering the column headers. |
EditEnterKeyAction | Gets or sets a value that determines the action when enter key is pressed during editing mode. |
EditKeyGesture | Gets or sets a value that determines the key gesture used to enter the editing mode. |
EditMouseGesture | Gets or sets a value that determines the mouse gesture used to enter the editing mode. |
EmptyRowsVisibility | Gets or sets a value that determines the visibility of empty rows. |
EnableContextMenu | Gets or sets a value that determines whether context menus is enabled. |
EnableRowVirtualization | Gets or sets a value that determines whether row virtualization is enabled. |
EnterKeyAction | Gets or sets a value that determines the action when enter key is pressed. |
EnterNewRowOnClick | Gets or sets the a value that determine whether UXGridView will enter edit on new empty row on single click. |
ErrorStatusVisibility | Gets or sets a value that determines whether the error status is visible. |
ExpandedItem | Gets or sets the expanded item. |
ExportCommand | Gets or sets command that will be invoked when exporting data. |
ExportCssStyleSelector | Gets or sets the css style selector using for HTML exporting. |
ExportItems | Gets or sets the items to be exported. |
ExportOptions | Gets or sets the export options. |
FilterDescriptors | Gets or sets the descriptor object that encapsulates the filtering related information. |
FrozenColumnCount | Gets or sets the number of columns that the user cannot scroll horizontally. |
GridLinesVisibility | Gets or sets a value that indicates which grid lines separating inner cells are shown. |
GroupByBoxStyle | Gets or sets the style that is used when rendering the group by box element. |
GroupByBoxVisibility | Gets or sets a value that determines whether the group by box is visible. |
GroupDescriptors | Gets collection of group descriptors. |
GroupFootersVisibility | Gets or sets a value that determines whether the group footer is visible. |
HasChanges | Gets or sets a value that indicates whether there are data changes or not. |
HeaderAndRowSeparatorBrush | Gets or sets the Brush that is used to paint lines separating rows and column header. |
HorizontalGridLinesBrush | Gets or sets the Brush that is used to paint grid lines separating rows. |
HorizontalScrollBarVisibility | Gets or sets a value that indicates how the horizontal scroll bar is displayed. |
HorizontalScrollMode | Gets or sets a value that determine the horizontal scroll mode. |
InsertRowCommand | Gets or sets command that will be invoked when inserting row. |
IsBusy | Gets or sets a value that indicates whether the control is busy. |
IsInsertingNewRow | Gets or sets a value that indicates whether the UXGridView new row is activated. |
IsReadOnlyBinding | Gets or sets the binding that associates the IsReadOnly attribute with a property in the data source. |
IsRefreshed | Gets or sets a value that indicates whether the UXGridView is refreshed. |
IsRowDirtyBinding | Gets or sets the binding that associates the IsReadOnly attribute with a property in the data source. |
IsValid | Gets a value that indicates whether data in the grid is valid. |
ItemsSource | Gets or sets a collection that is used to generate the content of the control. |
LostFocusAction | Gets or sets a value that determine the lost focus action when user lost focus during row editing. |
MaxColumnWidth | Gets or sets the maximum width of columns in the UXGridView. |
MinColumnWidth | Gets or sets the minimum width of columns in the UXGridView. |
NewItem | Gets or sets the new item to be added. |
NewRowLostFocusAction | Gets or sets a value that determine the lost focus action when user lost focus during new row editing. |
NewRowPosition | Gets or sets a value that determine the position of new row. |
NoDataTemplate | Gets or sets the no data template. |
PageDescriptor | Gets or sets the descriptor object that encapsulates the paging related information. |
PagerAutoEllipsis | Gets or sets a value that indicates whether to use an ellipsis as the last numeric button of UXDataPager. |
PagerDisplayMode | Gets or sets a value that indicates how the UXDataPager user interface is displayed. |
PagerNumericButtonCount | Gets or sets a value that indicates the number of page buttons shown on the UXDataPager user interface. |
PagerStyle | Gets or sets the style that is used when rendering the UXDataPager. |
PageSize | Gets or sets a value that indicates the number of items displayed on a page. |
PrepareNewRowCommand | Gets or sets command that will be invoked when preparing new row. |
QueryOperation | Gets or sets a value that determines whether the filtering operation should be performed in client-side or server-side. |
RefreshCommand | Gets or sets command that will be invoked when refreshing data. |
RefreshCommandParameter | Gets or sets the parameter to pass to the RefreshCommand property. |
RejectChangesCommand | Gets or sets command that will be invoked when data changes is rejected. |
RejectRowCommand | Gets or sets command that will be invoked when row changes is rejected. |
ResourceOverride | Gets or sets the individual resource object to override the existing localized resource. |
RowBackground | Gets or sets the Brush that is used to paint row backgrounds. |
RowDetailsTemplate | Gets or sets the template that is used to display the content of the details section of rows. |
RowDetailsTemplateSelector | Gets or sets the template selector that is used to display the content of the details section of rows. |
RowDetailsVisibilityMode | Gets or sets a value that indicates when the details sections of rows are displayed. |
RowGroupFooterCellStyle | Gets or sets the style that is used when rendering the row group footer cell. |
RowGroupFooterCellStyleSelector | Gets or sets the style selector that is used when rendering the row group footer cell. |
RowGroupFooterStyle | Gets or sets the style that is used when rendering the row group footer. |
RowGroupFooterStyleSelector | Gets or sets the style selector that is used when rendering the row group footer. |
RowGroupHeaderStyle | Gets or sets the style that is used when rendering the row group header. |
RowGroupHeaderStyleSelector | Gets or sets the style selector that is used when rendering the row group header. |
RowGroupHeaderTemplateSelector | Gets or sets the template selector that is used when rendering the row group headers. |
RowHeaderStyle | Gets or sets the style that is used when rendering the row header. |
RowHeaderVisibility | Gets or sets a value that determines whether the row header is visible. |
RowHeaderWidth | Gets or sets the width of the row header column. |
RowHeight | Gets or sets the standard height of rows in the control. |
RowStyle | Gets or sets the style that is used when rendering the rows. |
RowStyleSelector | Gets or sets the style selector that is used when rendering the rows. |
RowTemplate | Gets or sets the template that is used when rendering the rows. |
RowTemplateSelector | Gets or sets the template selector that is used when rendering the rows. |
SaveChangesCommand | Gets or sets command that will be invoked when data changes is accepted. |
ScrollBarStyle | Gets or sets the style that is used when rendering the scrollbar. |
ScrollCornerBackground | Gets or sets the Brush that is used to paint scroll corner element. |
ScrollIndicatorBinding | Gets or sets the binding that associates the scroll indicator with property in the data source. |
ScrollIndicatorStyle | Gets or sets the style that is used when rendering the scroll indicator. |
ScrollIndicatorTemplate | Gets or sets the template that is used when rendering the scroll indicator. |
SelectedIndex | Gets or sets the index of the current selection. |
SelectedItem | Gets or sets the data item corresponding to the selected row. |
SelectedItems | Gets a list that contains the data items corresponding to the selected rows. |
SelectionMode | Gets or sets the selection behavior of the gridview. |
SelectionUnit | Gets or sets the selection unit of gridview. |
SortDescriptions | Gets or sets the sort descriptions object that encapsulates the sorting related information. |
SortDescriptors | Gets or sets the descriptor object that encapsulates the sorting related information. |
StatusBarCommandTemplate | Gets or sets the data template to apply to the StatusBarCommand. |
StatusBarStyle | Gets or sets the style that is used when rendering the statusbar. |
StatusBarVisibility | Gets or sets a value that determines whether the status bar is visible. |
UpdateCellCommand | Gets or sets command that will be invoked when updating a cell. |
UpdateRowCommand | Gets or sets command that will be invoked when updating a row. |
ValidateRowCommand | Gets or sets the command that will be invoked when validating a row. |
ValidationResults | Gets or sets the validation results. |
VerticalGridLinesBrush | Gets or sets the Brush that is used to paint grid lines separating columns. |
VerticalScrollBarVisibility | Gets or sets a value that indicates how the vertical scroll bar is displayed. |
VerticalScrollMode | Gets or sets a value that indicates the vertical scroll mode. |
Protected Properties
CurrentItem | Gets the data item bound to the row that contains the current cell. |
Product | Product Info. |
Fields
AlternatingRowBackgroundProperty | Identifies the AlternatingRowBackground dependency property. |
AreRowDetailsFrozenProperty | Identifies the AreRowDetailsFrozen dependency property. |
AreRowGroupHeadersFrozenProperty | Identifies the AreRowGroupHeadersFrozen dependency property. |
AutoEditOperationProperty | Identifies the AutoEditOperation dependency property. |
AutoFocusOnErrorProperty | Identifies the AutoFocusOnError dependency property. |
AutoGenerateColumnsProperty | Identifies the AutoGenerateColumns dependency property. |
BusyLatencyProperty | Identifies the BusyLatency dependency property. |
BusyOverlayBackgroundProperty | Identifies the BusyOverlayBackground dependency property. |
CanUserAddRowsProperty | Identifies the CanUserAddRows dependency property. |
CanUserBatchUpdateProperty | Identifies the CanUserBatchUpdate dependency property. |
CanUserDeleteRowsProperty | Identifies the CanUserDeleteRows dependency property. |
CanUserEditRowsProperty | Identifies the CanUserEditRows dependency property. |
CanUserExportProperty | Identifies the CanUserExport dependency property. |
CanUserFilterColumnsProperty | Identifies the CanUserFilterColumns dependency property. |
CanUserGroupColumnsProperty | Identifies the CanUserGroupColumns dependency property. |
CanUserPageProperty | Identifies the CanUserPage dependency property. |
CanUserReorderColumnsProperty | Identifies the CanUserReorderColumns dependency property. |
CanUserResizeColumnsProperty | Identifies the CanUserResizeColumns dependency property. |
CanUserSortColumnsProperty | Identifies the CanUserSortColumns dependency property. |
CellBusyTemplateProperty | Identifies the CellBusyTemplate dependency property. |
CellEditingTemplateSelectorProperty | Identifies the CellEditingTemplateSelector dependency property. |
CellStyleProperty | Identifies the CellStyle dependency property. |
CellStyleSelectorProperty | Identifies the CellStyleSelector dependency property. |
CellTemplateSelectorProperty | Identifies the CellTemplateSelector dependency property. |
CheckedItemsProperty | Identifies the CheckedItems dependency property. |
ClipboardCopyModeProperty | Identifies the ClipboardCopyMode dependency property. |
ColumnFooterCellStyleProperty | Identifies the ColumnFooterCellStyle dependency property. |
ColumnFooterCellStyleSelectorProperty | Identifies the ColumnFooterCellStyleSelector dependency property. |
ColumnFooterStyleProperty | Identifies the ColumnFooterStyle dependency property. |
ColumnFooterVisibilityProperty | Identifies the ColumnFooterVisibility dependency property. |
ColumnHeaderHeightProperty | Identifies the ColumnHeaderHeight dependency property. |
ColumnHeaderStyleProperty | Identifies the ColumnHeaderStyle dependency property. |
ColumnHeaderStyleSelectorProperty | Identifies the ColumnHeaderStyleSelector dependency property. |
ColumnHeaderTemplateSelectorProperty | Identifies the ColumnHeaderTemplateSelector dependency property. |
ColumnHeaderVisibilityProperty | Identifies the ColumnHeaderVisibility dependency property. |
ColumnsProperty | Identifies the Columns dependency property. |
ColumnWidthProperty | Identifies the ColumnWidth dependency property. |
ContextMenuStyleProperty | Identifies the ContextMenuStyle dependency property. |
CornerRadiusProperty | Identifies the CornerRadius dependency property. |
DeleteRowCommandProperty | Identifies the DeleteRowCommand dependency property. |
DoubleClickCommandProperty | Identifies the DoubleClickCommand dependency property. |
DragIndicatorStyleProperty | Identifies the DragIndicatorStyle dependency property. |
DropLocationIndicatorStyleProperty | Identifies the DropLocationIndicatorStyle dependency property. |
EditEnterKeyActionProperty | Identifies the EditEnterKeyAction dependency property. |
EditKeyGestureProperty | Identifies the EditKeyGesture dependency property. |
EditMouseGestureProperty | Identifies the EditMouseGesture dependency property. |
EmptyRowsVisibilityProperty | Identifies the EmptyRowsVisibility dependency property. |
EnableContextMenuProperty | Identifies the EnableContextMenu dependency property. |
EnableRowVirtualizationProperty | Identifies the EnableRowVirtualization dependency property. |
EnterKeyActionProperty | Identifies the EnterKeyAction dependency property. |
EnterNewRowOnClickProperty | Identifies the EnterNewRowOnClick dependency property. |
ErrorStatusVisibilityProperty | Identifies the ErrorStatusVisibility dependency property. |
ExpandedItemProperty | Identifies the ExpandedItem dependency property. |
ExportCommandProperty | Identifies the ExportCommand dependency property. |
ExportCssStyleSelectorProperty | Identifies the ExportCssStyleSelector dependency property. |
ExportItemsProperty | Identifies the ExportItems dependency property. |
ExportOptionsProperty | Identifies the ExportOptions dependency property. |
FilterDescriptorsProperty | Identifies the FilterDescriptors dependency property. |
FrozenColumnCountProperty | Identifies the FrozenColumnCount dependency property. |
GridLinesVisibilityProperty | Identifies the GridLinesVisibility dependency property. |
GroupByBoxStyleProperty | Identifies the GroupByBoxStyle dependency property. |
GroupByBoxVisibilityProperty | Identifies the GroupByBoxVisibility dependency property. |
GroupFootersVisibilityProperty | Identifies the GroupFootersVisibility dependency property. |
HasChangesProperty | Identifies the HasChanges dependency property. |
HeaderAndRowSeparatorBrushProperty | Identifies the HeaderAndRowSeparatorBrush dependency property. |
HorizontalGridLinesBrushProperty | Identifies the HorizontalGridLinesBrush dependency property. |
HorizontalScrollBarVisibilityProperty | Identifies the HorizontalScrollBarVisibility dependency property. |
HorizontalScrollModeProperty | Identifies the HorizontalScrollMode dependency property. |
InsertRowCommandProperty | Identifies the InsertRowCommand dependency property. |
IsBusyProperty | Identifies the IsBusy dependency property. |
IsInsertingNewRowProperty | Identifies the IsInsertingNewRow dependency property. |
IsRefreshedProperty | Identifies the IsRefreshed dependency property. |
IsValidProperty | Identifies the IsValid dependency property. |
ItemsSourceProperty | Identifies the ItemsSource dependency property. |
LostFocusActionProperty | Identifies the LostFocusAction dependency property. |
MaxColumnWidthProperty | Identifies the MaxColumnWidth dependency property. |
MinColumnWidthProperty | Identifies the MinColumnWidth dependency property. |
NewItemProperty | Identifies the NewItem dependency property. |
NewRowLostFocusActionProperty | Identifies the NewRowLostFocusAction dependency property. |
NewRowPositionProperty | Identifies the NewRowPosition dependency property. |
NoDataTemplateProperty | Identifies the NoDataTemplate dependency property. |
PageDescriptorProperty | Identifies the QueryDescriptor dependency property. |
PagerAutoEllipsisProperty | Identifies the PagerAutoEllipsis dependency property. |
PagerDisplayModeProperty | Identifies the PagerDisplayMode dependency property. |
PagerNumericButtonCountProperty | Identifies the PagerNumericButtonCount dependency property. |
PagerStyleProperty | Identifies the PagerStyle dependency property. |
PageSizeProperty | Identifies the PageSize dependency property. |
PrepareNewRowCommandProperty | Identifies the PrepareNewRowCommand dependency property. |
QueryOperationProperty | Identifies the QueryOperation dependency property. |
RefreshCommandParameterProperty | Identifies the RefreshCommandParameter dependency property. |
RefreshCommandProperty | Identifies the RefreshCommand dependency property. |
RejectChangesCommandProperty | Identifies the RejectChangesCommand dependency property. |
RejectRowCommandProperty | Identifies the RejectRowCommand dependency property. |
ResourceOverrideProperty | Identifies the ResourceOverride dependency property. |
RowBackgroundProperty | Identifies the RowBackground dependency property. |
RowDetailsTemplateProperty | Identifies the RowDetailsTemplate dependency property. |
RowDetailsTemplateSelectorProperty | Identifies the RowDetailsTemplateSelector dependency property. |
RowDetailsVisibilityModeProperty | Identifies the RowDetailsVisibilityMode dependency property. |
RowGroupFooterCellStyleProperty | Identifies the RowGroupFooterCellStyle dependency property. |
RowGroupFooterCellStyleSelectorProperty | Identifies the RowGroupFooterCellStyleSelector dependency property. |
RowGroupFooterStyleProperty | Identifies the RowGroupFooterStyle dependency property. |
RowGroupFooterStyleSelectorProperty | Identifies the RowGroupFooterStyleSelector dependency property. |
RowGroupHeaderStyleProperty | Identifies the RowGroupHeaderStyle dependency property. |
RowGroupHeaderStyleSelectorProperty | Identifies the RowGroupHeaderStyleSelector dependency property. |
RowGroupHeaderTemplateSelectorProperty | Identifies the RowGroupHeaderTemplateSelector dependency property. |
RowHeaderStyleProperty | Identifies the RowHeaderStyle dependency property. |
RowHeaderVisibilityProperty | Identifies the RowHeaderVisibility dependency property. |
RowHeaderWidthProperty | Identifies the RowHeaderWidth dependency property. |
RowHeightProperty | Identifies the RowHeight dependency property. |
RowStyleProperty | Identifies the RowStyle dependency property. |
RowStyleSelectorProperty | Identifies the RowStyleSelector dependency property. |
RowTemplateProperty | Identifies the RowTemplate dependency property. |
RowTemplateSelectorProperty | Identifies the RowTemplateSelector dependency property. |
SaveChangesCommandProperty | Identifies the SaveChangesCommand dependency property. |
ScrollBarStyleProperty | Identifies the ScrollBarStyle dependency property. |
ScrollCornerBackgroundProperty | Identifies the ScrollCornerBackground dependency property. |
ScrollIndicatorStyleProperty | Identifies the ScrollIndicatorStyle dependency property. |
ScrollIndicatorTemplateProperty | Identifies the ScrollIndicatorTemplate dependency property. |
SelectedIndexProperty | Identifies the SelectedIndex dependency property. |
SelectedItemProperty | Identifies the SelectedItem dependency property. |
SelectedItemsProperty | Identifies the SelectedItems dependency property. |
SelectionModeProperty | Identifies the SelectionMode dependency property. |
SelectionUnitProperty | Identifies the SelectionUnit dependency property. |
SortDescriptorsProperty | Identifies the SortDescriptors dependency property. |
StatusBarCommandTemplateProperty | Identifies the StatusBarCommandTemplate dependency property. |
StatusBarStyleProperty | Identifies the StatusBarStyle dependency property. |
StatusBarVisibilityProperty | Identifies the StatusBarVisibility dependency property. |
UpdateCellCommandProperty | Identifies the UpdateCellCommand dependency property. |
UpdateRowCommandProperty | Identifies the UpdateRowCommand dependency property. |
ValidateRowCommandProperty | Identifies the ValidateRowCommand dependency property. |
ValidationResultsProperty | Identifies the ValidationResults dependency property. |
VerticalGridLinesBrushProperty | Identifies the VerticalGridLinesBrush dependency property. |
VerticalScrollBarVisibilityProperty | Identifies the VerticalScrollBarVisibility dependency property. |
VerticalScrollModeProperty | Identifies the VerticalScrollMode dependency property. |
Public Methods
AttachEventHandlers() | Attach built-in event handlers to control templates. Call this method if necessary. |
BeginEdit() | Causes the gridview to enter editing mode for the current cell and current row, unless the gridview is already in editing mode. |
BeginEdit(RoutedEventArgs) | Causes the gridview to enter editing mode for the current cell and current row in the specified keyboard and mouse state. |
CancelEdit() | Causes the gridview to cancel the current edit, restore the original value, and exit editing mode. |
CancelEdit(EditingUnit) | Causes the gridview to cancel the current edit, restore the original value, and exit editing mode. |
CollapseRowGroup(CollectionViewGroup, bool) | Collapses gridview row groups. |
CommitEdit() | Causes the gridview to commit the current edit to the data source and exit editing mode. |
CommitEdit(EditingUnit, bool) | Causes the gridview to commit the current edit to the data source, and optionally exit editing mode. |
DetachedEventHandlers() | Detach built-in event handlers from control templates. Call this method if necessary. |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
ExpandRowGroup(CollectionViewGroup, bool) | Expands gridview row groups. |
Export(Stream, UXGridViewExportOptions) | Export data to the specified stream. |
InitializeTemplates() | Initializes control templates. |
OnApplyTemplate() | Builds the visual tree for the UXGridView when a new template is applied. |
ScrollIntoView(object, UXGridViewColumn) | Scrolls the UXGridView vertically to display the row for the specified data item and scrolls the UXGridView horizontally to display the specified column. |
Protected Methods
Events
AutoGeneratingColumn | Occurs one time for each public, non-static property in the bound data type when the ItemsSource property is changed and the AutoGenerateColumns property is true. |
BeginningEdit | Occurs before a cell or row enters editing mode. |
CellEditEnded | Occurs when a cell edit has been committed or canceled. |
CellEditEnding | Occurs when a cell edit is ending. |
ColumnDisplayIndexChanged | Occurs when the DisplayIndex property of a column changes. |
ColumnReordered | Occurs when a UXGridView column has moved to a new position in the display order. |
ColumnReordering | Occurs before a UXGridView column moves to a new position in the display order. |
CopyingRowClipboardContent | Occurs when the row is prepared for a clipboard copy operation. |
CurrentCellChanged | Occurs when a different cell becomes the current cell. |
Exported | Occurs when data is succesfully exported. |
Exporting | Occurs when data is being exported. |
PreparingCellForEdit | Occurs when a cell in a column enters editing mode. |
RowDetailsVisibilityChanged | Occurs when the RowDetailsVisibilityMode property value changes. |
RowEditEnded | Occurs when a row edit has been committed or canceled. |
RowEditEnding | Occurs when a row edit is ending. |
SelectionChanged | Occurs when the SelectedItem or SelectedItems property value changes. |
...
public ICommand ExportCommand { get; set; }
Gets or sets command that will be invoked when exporting data.
Remarks
By default, the exporting processes only the data available in the client. Therefore if you enable server paging, you might not be able to export the complete data correctly. To address this challenge, you can implement the ExportCommand in the ViewModel and provide the desired data to the UXGridView property. |
Anchor | ||||
---|---|---|---|---|
|
...
public IEnumerable ExportItems { get; set; }
Gets or sets the items to be exported.
Remarks
By default, the exporting processes only the data available in the client. Therefore if you enable server paging, you might not be able to export the complete data correctly. To address this challenge, you can implement the UXGridView in the ViewModel and provide the desired data to the ExportItems property. |
...
public CompositeFilterDescriptorCollection FilterDescriptors { get; set; }
Gets or sets the descriptor object that encapsulates the filtering related information.
Remarks
Server data operation means that the data operation, such as sorting, filtering and paging; are processed in the server side. In this mode, UXGridView does not handle the data operation by its own. It will simply provide the query information allowing you to process it further to a data service. To use this mode, you set the UXDataPager property to Server. When this mode is selected, UXGridView will not attempt to perform the data operation on the given data source. Instead, it will store and distribute the query information on several properties such as FilterDescriptors, UXGridView and UXGridView property. When one of these properties change, the QueryChanged event of the associated QueryDescriptor will be raised. This allows you to streamline the query processing in a centralized function, which is one of the strong benefits of QueryDescriptor. For more information about QueryDescriptor, see QueryDescriptor Overview. To learn how to perform server-side sorting, filtering and paging using UXGridView, see How-to: Implement Server-side Sorting, Filtering and Paging using UXGridView. |
...
public bool HasChanges { get; set; }
Gets or sets a value that indicates whether there are data changes or not.
Remarks
If you prefer to automatically update the records after each CUD operation, you can perform the server operation in the UXGridView, UXGridView and UXGridView respectively, and perhaps followed with the UXGridView to refresh the data. However, if you prefer a batch update, you can notify the UXGridView by setting the HasChanges property to true, and later call the SaveChanges method to save all changes in one server call. |
...
public ScrollMode HorizontalScrollMode { get; set; }
Gets or sets a value that determine the horizontal scroll mode.
Remarks
When you need to increase the scrolling performance even further, especially due to larger view port, you can set the HorizontalScrollMode and UXGridView properties to ScrollMode. In this mode, the row virtualization will be suspended during scrolling, and resumed when the scrolling completes. When you set the scroll mode to ScrollMode, you will see a visual indicator as you scroll through the vertical scroll bar. You can use the UXGridView or UXGridView to customize the appearance and template of the scrolling visual indicator. |
...
public LostFocusAction LostFocusAction { get; set; }
Gets or sets a value that determine the lost focus action when user lost focus during row editing.
Remarks
When you lost focus from an edited row, by default UXGridView will commit the current edit operation you can change this behavior by changing the LostFocusAction property and UXGridView property to CancelEdit. This setting will force UXGridView to cancel the current edit operation when the focus is lost from the edited row. UXGridView property determines the action for new row object, while UXGridView determines the action for existing rows. |
...
public LostFocusAction NewRowLostFocusAction { get; set; }
Gets or sets a value that determine the lost focus action when user lost focus during new row editing.
Remarks
When you lost focus from an edited row, by default UXGridView will commit the current edit operation you can change this behavior by changing the UXGridView property and NewRowLostFocusAction property to CancelEdit. This setting will force UXGridView to cancel the current edit operation when the focus is lost from the edited row. NewRowLostFocusAction property determines the action for new row object, while UXGridView determines the action for existing rows. |
...
public PageDescriptor PageDescriptor { get; set; }
Gets or sets the descriptor object that encapsulates the paging related information.
Remarks
Server data operation means that the data operation, such as sorting, filtering and paging; are processed in the server side. In this mode, UXGridView does not handle the data operation by its own. It will simply provide the query information allowing you to process it further to a data service. To use this mode, you set the UXDataPager property to Server. When this mode is selected, UXGridView will not attempt to perform the data operation on the given data source. Instead, it will store and distribute the query information on several properties such as UXGridView, UXGridView and PageDescriptor property. When one of these properties change, the QueryChanged event of the associated QueryDescriptor will be raised. This allows you to streamline the query processing in a centralized function, which is one of the strong benefits of QueryDescriptor. For more information about QueryDescriptor, see QueryDescriptor Overview. To learn how to perform server-side sorting, filtering and paging using UXGridView, see How-to: Implement Server-side Sorting, Filtering and Paging using UXGridView. |
...
public PagerDisplayMode PagerDisplayMode { get; set; }
Gets or sets a value that indicates how the UXDataPager user interface is displayed.
Remarks
You can customize the appearance of the UXDataPager by setting the PagerDisplayMode property. If you use a PagerDisplayMode that displays numeric buttons, you can change the number of buttons displayed by setting the UXGridView property. |
Anchor | ||||
---|---|---|---|---|
|
public int PagerNumericButtonCount { get; set; }
Gets or sets a value that indicates the number of page buttons shown on the UXDataPager user interface.
Remarks
You can customize the appearance of the UXDataPager by setting the UXGridView property. If you use a UXGridView that displays numeric buttons, you can change the number of buttons displayed by setting the PagerNumericButtonCount property. |
...
public QueryOperation QueryOperation { get; set; }
Gets or sets a value that determines whether the filtering operation should be performed in client-side or server-side.
Remarks
It is often useful to view and interact with information in a data grid control such as UXGridView in different ways by grouping, sorting, filtering or paging the data. To handle this data operation, UXGridView provides two approaches that you can choose from by setting the QueryOperation property.Client Data OperationClient data operation means that the data operation, such as sorting, filtering and paging; are executed in the client side against the data source provided to the UXGridView. To use this operation, you set the QueryOperation property to Client. You typically use a collection that implements IPagedCollectionView as the data source or encapsulate the collection to a PagedCollectionView class. To learn how to perform client-side sorting, filtering and paging using UXGridView, see How-to: Implement Client-side Sorting, Filtering and Paging using UXGridView.Server Data OperationServer data operation means that the data operation, such as sorting, filtering and paging; are processed in the server side. In this mode, UXGridView does not handle the data operation by its own. It will simply provide the query information allowing you to process it further to a data service. To use this mode, you set the QueryOperation property to Server. When this mode is selected, UXGridView will not attempt to perform the data operation on the given data source. Instead, it will store and distribute the query information on several properties such as UXGridView, UXGridView and UXGridView property. When one of these properties change, the QueryChanged event of the associated QueryDescriptor will be raised. This allows you to streamline the query processing in a centralized function, which is one of the strong benefits of QueryDescriptor. For more information about QueryDescriptor, see QueryDescriptor Overview. To learn how to perform server-side sorting, filtering and paging using UXGridView, see How-to: Implement Server-side Sorting, Filtering and Paging using UXGridView. |
...
public Binding ScrollIndicatorBinding { get; set; }
Gets or sets the binding that associates the scroll indicator with property in the data source.
Remarks
When you need to increase the scrolling performance even further, especially due to larger view port, you can set the UXGridView and UXGridView properties to ScrollMode. In this mode, the row virtualization will be suspended during scrolling, and resumed when the scrolling completes. When you set the scroll mode to ScrollMode, you will see a visual indicator as you scroll through the vertical scroll bar. You can use the ScrollIndicatorBinding or ScrollIndicatorTemplate to customize the appearance and template of the scrolling visual indicator. |
...
public SortDescriptionCollection SortDescriptions { get; }
Gets or sets the sort descriptions object that encapsulates the sorting related information.
Remarks
To implement a predefined sorting, you specify the SortDescriptions or UXGridView property in XAML depending on the value of the UXDataPager property. The SortDescriptions is used when the control is configured with client data operation, while the UXGridView is used for server data operation. |
...
public SortDescriptorCollection SortDescriptors { get; set; }
Gets or sets the descriptor object that encapsulates the sorting related information.
Remarks
Server data operation means that the data operation, such as sorting, filtering and paging; are processed in the server side. In this mode, UXGridView does not handle the data operation by its own. It will simply provide the query information allowing you to process it further to a data service. To use this mode, you set the UXDataPager property to Server. When this mode is selected, UXGridView will not attempt to perform the data operation on the given data source. Instead, it will store and distribute the query information on several properties such as UXGridView, SortDescriptors and UXGridView property. When one of these properties change, the QueryChanged event of the associated QueryDescriptor will be raised. This allows you to streamline the query processing in a centralized function, which is one of the strong benefits of QueryDescriptor. For more information about QueryDescriptor, see QueryDescriptor Overview. To learn how to perform server-side sorting, filtering and paging using UXGridView, see How-to: Implement Server-side Sorting, Filtering and Paging using UXGridView. |
...
public ScrollMode VerticalScrollMode { get; set; }
Gets or sets a value that indicates the vertical scroll mode.
Remarks
When you need to increase the scrolling performance even further, especially due to larger view port, you can set the UXGridView and VerticalScrollMode properties to ScrollMode. In this mode, the row virtualization will be suspended during scrolling, and resumed when the scrolling completes. When you set the scroll mode to ScrollMode, you will see a visual indicator as you scroll through the vertical scroll bar. You can use the UXGridView or UXGridView to customize the appearance and template of the scrolling visual indicator. |
...