This is a migrated thread and some comments may be shown as answers.

How can I access the 1st item of a filtered datasource?

1 Answer 37 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Florian
Top achievements
Rank 1
Florian asked on 06 Nov 2012, 04:32 PM
Hi,

I am using a datasource with a filter on it.

How can I get the 1st item of the data, which the filter returns?

Sample: The datasource has 20 items. When I apply a filter, the filter returns only 5 items. How can I access the 1st of the 5 items and all its properties?

Thanks
Florian

1 Answer, 1 is accepted

Sort by
0
Florian
Top achievements
Rank 1
answered on 07 Nov 2012, 10:13 AM

In order to get the view of the data with applied paging, sorting, filtering etc. operations, you should use DataSource view method. Thus, getting the first item looks similar to the following:

dataSource.view()[0]
Tags
Data Source
Asked by
Florian
Top achievements
Rank 1
Answers by
Florian
Top achievements
Rank 1
Share this question
or