Using Recordset Methods And Properties - MACROMEDIA FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 Use Manual

Using flash remoting for flash mx 2004 actionscript 2.0
Table of Contents

Advertisement

Method
RecordSet.setDeliveryMode()
RecordSet.setField()
RecordSet.sort()
RecordSet.sortItems()
RecordSet.sortItemsBy()
For more information about each of these methods, see Flash Remoting ActionScript Dictionary
Help. The following sections describe how you can use these methods to create and manage
RecordSet objects in ActionScript code.

Using RecordSet methods and properties

The following sections describe how to use
Creating RecordSet objects
Most RecordSet objects are returned by service functions, so you do not typically have to create
them. However, you can use the RecordSet object constructor to create a record set directly in
ActionScript. For example, the following line creates a new RecordSet object with two columns:
DepartmentID and DepartmentName. This RecordSet object does not contain any data:
myRecordSet = new RecordSet(["DepartmentID", "DepartmentName"]);
Getting values and information from RecordSet objects
The following sections describe how to get record set values and information.
Getting record set data values
To get a specific record in the RecordSet object, specify the record's 0-based index in the
method. For example, the following line gets the third record in a record set:
getItemAt()
myRecord = myRecordSet.getItemAt(2);
To get the value of a specific field in a record, use the column name as a property of the record.
For example, use the following line to get the value of the DepartmentName field of the fourth
record in the RecordSet object named myRecordSet:
myDept = myRecordSet.getItemAt(3).DepartmentName;
Note: Because the RecordSet object implements all of the ActionScript DataProvider methods, you
can also use RecordSet objects directly with any object that takes a DataProvider, such as the Flash
UI ComboBox Component. For more information on using RecordSet objects with Flash UI
components, see
76
Chapter 4: Using Flash Remoting Data in ActionScript
Description
Changes the delivery mode of a pageable record set from an
application server.
Replaces one field of a record with a new value.
Sorts all the records using a comparison function that you
specify as an argument to the method.
Sorts all the records using a user-specified comparison
function
Sorts all records in the RecordSet object in ascending or
descending order, according to the current locale's sorting
order.
"Using Flash UI components with RecordSet objects" on page
methods to manage RecordSet objects.
RecordSet
83.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash remoting mx

Table of Contents