!../../wiki/easy-ide-book/common/images/prev_page.gif! !../../wiki/easy-ide-book/common/images/toc.gif! !../../wiki/easy-ide-book/common/images/next_page.gif!
<font color="navy">Structure of a Program that Sorts and Filters the Data</font> 
The <font color="purple">RecordGrid</font> data can be sorted and filtered.
set rg.sort = score DESC
We can use sort to sort the data displayed by <font color="purple">RecordGrid</font>. To do so, we specify the names of the fields to be sorted as character strings. As in this example, when we want to sort the data into descending order, we add DESC after each field name. We can specify multiple fields by delimiting their names with a comma (,).
set rg.sort = score DESC, age DESC
By using RecordSort, we can specify more complex types of sorting.
set rg.filter = {RecordData city = Miami}
To filter the data to be displayed, we use the filter field. To specify the fields and data to be filtered, we use <font color="purple">RecordData</font>. Using <font color="purple">RecordFilter</font>, we can specify relatively complex filtering. If we specify null, then no filtering is performed.
{rg.set-frozen-region 0,1}
Using set-frozen-region, we can fix the position of the <font color="purple">RecordGrid</font> window frame. This prevents the scrolling of the specified lines and columns. There are several other APIs for managing fixed lines and columns. These are described in the Curl API documentation.
{VBox
rg,
{HBox
sort-button,
filter-button,
reverse-button
}
}
As explained above, the final expression specified in the value block is displayed on the screen. In the current example, this <font color="purple">VBox</font> is the final expression. Therefore, the screen layout will appear as shown in the figure.
There are no comments on this document