Introduction to controls under Atlas namespace SYS. Data -- dataview and datafilter

Source: Internet
Author: User

Http://dflying.dflying.net/1/archive/125_introduction_to_atlas_controls_in_namespace_sysdata__dataview_and_datafilter.html

This series includes the following three articles:Article:

    1. Introduction to controls under Atlas namespace SYS. Data -- datasource and xmldatasource
    2. Introduction to controls under Atlas namespace SYS. Data -- datacolumn, datarow, and able
    3. Introduction to controls under Atlas namespace SYS. Data -- dataview and datafilter

This article is Atlas Namespace SYS. Data The following is the third and last article about this series of controls. In my first two articles ( AtlasNamespaceSYS. DataIntroduction to the following controls-- DatasourceAndXmldatasource , AtlasLifeNamespaceSYS. DataIntroduction to the following controls-- Datacolumn,DatarowAndDatatable ), We discussed how to use the data source control to obtain data from the server and store the data on the client, and how to use Datatable Object. So far, we can directly display the data to users.ModifyFor example, when Datatable When the data volume is large, we need to implement the paging function, or the user wants to sort by a column, or the user is only interested in some of the data (for example, Name Equal Dflying ). This is also Atlas Introduced in Dataview And Datafilter Object. In this article, I will introduce how to use Dataview And Datafilter Object modifier to provide UI Control display.

DataviewObjects can be paged and sorted.DatafilterFilter data. Below isDataviewObject Attributes:

  1. Data: Store the original data that has not been modified. You should always useDatasourceTheDatatableThe object is set to this attribute for future operations.
  2. Filtereddata: Modified data, such as paging data or filtered data.
  3. Filters: To be appliedDataAttributeDatafilter. You can specify multipleDatafilterObjects, which are applied to the original data in order to filter them. ForDatafilterFor more information about objects, see the following section.
  4. Hasnextpage: Whether the next page exists after the current page.
  5. Haspreviouspage: Whether the previous page exists before the current page.
  6. Length: The actual number of entries on the current page.
  7. Pagecount: CurrentDataviewThe number of pages in.
  8. Pageindex: Index of the current page.
  9. Pagesize: The length of each page (the maximum number of entries on each page ). If you need the paging function, set this attribute.
  10. Sortcolumn:DataviewSort by the specified column in this attribute. If you need the sorting function, set this attribute.
  11. Sortdirection: Sorting direction. OptionalAscending(Default) orDescending.

DataviewThe object also has the following method:

    1. Sort: AccordingSortcolumnAttributes andSortdirectionAttribute to sort the current data set.

Note that you may needSYS. Data. UINamespace controls:DatanavigatorAndSortbehaviorTo help you implement paging and sorting. AboutDataviewAnd the introduction and examples of the above two controlsProgramSee use the ASP. NET Atlas pagenavigator control to implement client paging navigation.

DataviewThe introduction is here for now. Let's take a look.DatafilterObject:

DatafilterIt is used to filter data.AtlasInSYS. Data. datafilterClass is defined as allFilterClass abstract base class. It provides an abstract method,Filter. All Derived classes use their own logic to implement this method and provide the corresponding filtering rules.

AtlasProvides a built-inDatafilter:PropertyfilterIt can filter this set based on a property value of the entries in the set.

PropertyfilterThere are two attributes:

    1. Property: ThisFilterWhich attribute will be applied to the entry.
    2. Value: The expected value of this attribute. Only when the value of this attribute of this entry is equal to the value specified here can this entry beFilterFilter out.

PropertyfilterThe sample program will be completed soon.

At the end of this series, let's summarizeAtlasNamespaceSYS. Data. If you can understand these three types of controlsAtlasDevelopment is of great benefit.

  1. DatasourceAndXmldatasource(AtlasNamespaceSYS. DataIntroduction to the following controls-- DatasourceAndXmldatasourceIs used to obtain data from the server and save the data on the client. After modification, the user can submit the data back to the server for storage.
  2. Datatable, IncludingDatarowAndDatacolumn(AtlasNamespaceSYS. DataIntroduction to the following controls-- Datacolumn,DatarowAndDatatableIs the actual storage object of client data. PassDatatableYou can operate (add, delete, modify, and so on) the data on the client ).
  3. DataviewAndDatafilter(This article) is used to modify the data (paging, sorting, filtering, etc.) before being displayed to the user.SQLOfWhereAndOrderOf course, these operations occur on the client and do not affect the actual client data.SQLMediumView(View.

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.