Detailed description of the features of the Silverlight DataGrid component

Source: Internet
Author: User

Description: The Silverlight DataGrid component is the most commonly used and powerful data component in the Silverlight data component. Therefore, it is necessary for developers to have a deep understanding of its features. This article first introduces the basic features of the component, and then describes the basic data operation process of the component through several simple examples.

Namespace of the Silverlight DataGrid component:

System. Windows. Controls

Common Methods for Silverlight DataGrid components:

Beginedit: enables the DataGrid to enter the editing status.

Canceledit: cancels the edit status of the DataGrid.

Collapserowgroup: the row group that closes the DataGrid.

Commitedit: confirm that the DataGrid is edited.

Expandrowgroup: Expand the row group of the DataGrid.

Getgroupfromitem: Get the group from a specific item.

Scrollintoview: Scroll the DataGrid view.

Common properties of the Silverlight DataGrid component:

Alternatingrowbackground: gets or sets a paint brush to depict the background of the odd row of the DataGrid.

Arerowdetailsfrozen: gets or sets a value to determine whether to freeze the details of each row.

Arerowgroupheadersfrozen: gets or sets a value to determine whether to freeze the header of the group row.

Autogeneratecolumns: gets or sets a value to determine whether to allow automatic generation of table columns.

Canuserreordercolumns: gets or sets a value to determine whether to allow users to rearrange the position of a table column.

Canusersortcolumns: gets or sets a value to determine whether users are allowed to sort the table content by column.

Cellstyle: gets or sets the cell style.

Columnheaderheight: gets or sets the height of the column header.

Columnheaderstyle: gets or sets the style of the column header.

Columns: gets a set of all columns in a component.

Columnwidth: gets or sets the column width.

Currentcolumn: gets or sets the column that contains the current cell.

Currentitem: obtains the data items that contain the current cell and are bound to the row.

Dragindicatorstyle: gets or sets the style when the column header is dragged.

Droplocationindicatorstyle: gets or sets the style when the column header is rendered.

Frozencolumncount: gets or sets the number of frozen columns.

Gridlinesvisibility: gets or sets the display format of gridlines.

Headersvisibility: obtains or sets the display format of the row header and column header.

Horizontalgridlinesbrush: gets or sets a paint brush for horizontal gridlines.

Horizontalscrollbarvisibility: gets or sets the display style of the horizontal scroll bar.

Isreadonly: gets or sets whether the DataGrid is read-only.

Maxcolumnwidth: gets or sets the maximum column width of the DataGrid.

Mincolumnwidth: gets or sets the smallest column width of the DataGrid.

Rowbackground: gets or sets the paint brush used to fill the row background.

Rowdetailstemplate: gets or sets a template that is used to display the details of a row.

Rowdetailsvisibilitymode: gets or sets a value to determine whether the row details are displayed.

Rowgroupheaderstyles: gets the style of the row group header.

Rowheaderstyle: gets or sets the style for rendering the row header.

Rowheaderwidth: gets or sets the width of the row header.

Rowheight: gets or sets the height of each row.

Rowstyle: gets or sets the style of the rendered row.

Selectedindex: gets or sets the index value of the selected part.

Selecteditem: gets or sets the data items bound to the currently selected row.

Selecteditems: gets the list of data items bound to the currently selected rows ).

Selectionmode: gets or sets the select mode of the DataGrid.

Verticalgridlinesbrush: gets or sets a paint brush for a vertical grid line.

Verticalscrollbarvisibility: gets or sets the display style of the vertical scroll bar.

Common events of the Silverlight DataGrid component:

Beginningedit: occurs before a cell or row enters the editing mode.

Celleditended: A cell editing task is confirmed or canceled.

Celleditending: occurs when a cell is being edited.

Currentcellchanged: occurs when a cell becomes the current cell.

Preparingcellforedit: occurs when a cell in the datagridtemplatecolumn enters the editing mode.

Selectionchanged: occurs when the value of selecteditem or selecteditems changes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.