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;