Dataview attribute operation

Source: Internet
Author: User

A. Sort data using the sort attribute

Thisview. Sort = "productname ASC ";

Or

Thisview. Sort = "Age ASC, name DESC ";

B. Use the rowfilter attribute to filter data.

Thisview. rowfilter =

"Id = 10 ";

"Num <= 10 ";

"Date> 1/1/1999 and date <= 2/2/2005 ";

"Product in ('apple', 'cat', 'table ')"

"Text like = '* son '";

Note: When you use *** in ('','', ''), note that there are not too many items in brackets, it is estimated that more than a dozen instances are supported.

1. filter data by a pair of X and Y coordinates X1 X2 Y1 Y2

Thisview. rowfilter =
"Hzby> = '" + X1 + "' and hzby <= '" + X2 + "' and zzbx> = '" + Y1 + "' and zzbx <= '" + y2 + "'";

2. filter conditions generated by Arrays

// Format: dataview. Filter = "gzdymc in ('job', 'tree', work ')";

String strview = "gzdymc in (";
Int II = 0;
While (II <coltruenames. Count)
{
Strview + = "'" + coltruenames [II] + "',";
II ++;
}

Strview + = "'null ')";
Thisview. rowfilter = strview;

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.