Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calendar and Datasource

    Hi,
    I have been working on the smartclient calendar and have a question when using it in combination with a datasource.

    With a datasource I see that the calendar retrieves events in a paged mode using startRow and endRow. But I don't really understand how startRow and endRow work considering that the calendar shows things in timebuckets (week/month).
    I checked the calendar source code and only in case of a timeline view I can see that an advanced criteria is build using a time period (see codesnippet below). But not in other cases, there it seems startRow and endRow are being used.

    Is there another standard way in which I can work with many events in the calendar which are read in a 'bucketed' approach?

    Code:
        if (this.fetchMode == "timeline") {
            view = this.timelineView;
            var criter = {
                _constructor:"AdvancedCriteria",
                operator:"and",
                criteria: [
                    { fieldName: this.startDateField, operator: "greaterThan", value: view.startDate},
                    { fieldName: this.endDateField, operator: "lessThan", value: view.endDate}
                ]
            };
            // allow users to manipulate the criteria by overriding getNewCriteria()
            criteria = this.adjustCriteria(criter);
        }
    gr. Martin

    #2
    Right now, there's no built-in support for paging by month, week or day. You can use the dateChanged notification to load the currently selected's month from a DataSource and apply it via setData().

    Comment

    Working...
    X