DataView
Inheritance: java.lang.Object
public class DataView
Represents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation.
Constructors
Constructor | Description |
---|---|
DataView(DataTable table) | Initializes a new instance of the DataView class with the specified DataTable. |
Methods
Method | Description |
---|---|
getCount() | Gets the number of records in the DataView. |
getTable() | Gets the source DataTable. |
get(int recordIndex) | Gets a row of data from a specified table. |
close() | Closes the DataView. |
DataView(DataTable table)
public DataView(DataTable table)
Initializes a new instance of the DataView class with the specified DataTable.
Parameters:
Parameter | Type | Description |
---|---|---|
table | DataTable | A DataTable to add to the DataView. |
getCount()
public int getCount()
Gets the number of records in the DataView.
Returns: int - The number of records in the DataView.
getTable()
public DataTable getTable()
Gets the source DataTable.
Returns: DataTable - A DataTable that provides the data for this view.
get(int recordIndex)
public DataRowView get(int recordIndex)
Gets a row of data from a specified table.
Parameters:
Parameter | Type | Description |
---|---|---|
recordIndex | int | The index of a record in the DataTable. |
Returns: DataRowView - A DataRowView of the row that you want.
close()
public void close()
Closes the DataView.