ASP.NET MVC Controls | ComponentOne
In This Topic
    RemoteCollectionView Class
    In This Topic
    File
    c1.mvc.collections.js
    Module
    c1.mvc.collections
    Derived Classes
    CallbackCollectionView

    Extends CollectionView to support remote data service.

    You can use the result objects from the data service as data sources for any Wijmo controls, and in addition to full CRUD support and real-time updates you automatically get CollectionView features including sorting, filtering, paging, grouping, and editing.

    Constructor

    constructor

    constructor(options: IRemoteCollectionViewSettings): RemoteCollectionView
    

    Initializes a new instance of a RemoteCollectionView.

    Parameters
    Returns
    RemoteCollectionView

    Properties

    pageCount

    Override pageCount to get the total number pages.

    Type
    number

    Methods

    Static cast

    cast(obj: any): RemoteCollectionView
    

    Casts the specified object to RemoteCollectionView type.

    Parameters
    • obj: any

      The object to cast.

    Returns
    RemoteCollectionView

    commit

    commit(): void
    

    Commit all the changes to the database. When the editing url in IRemoteCollectionViewSettings or batch editing is used, an ajax request will be sent to server side to comment the changes to the data source.

    Returns
    void

    commitEdit

    commitEdit(): void
    

    Override commitEdit to modify the item in the database. When updateActionUrl or batch editing is used, an ajax request will be sent to server side to update the data source.

    Returns
    void

    commitNew

    commitNew(): void
    

    Override commitNew to add the new item to the data source. When createActionUrl or batch editing is used, an ajax request will be sent to server side to update the data source.

    Returns
    void

    forceRefresh

    forceRefresh(): void
    

    Force to refresh the view using the current sort, filter and group parameters. When calling this method, an ajax request will be sent to server side to fecth data.

    Returns
    void

    getAllData

    getAllData(success: ICollectionViewResponseHandler): void
    

    Get the whole data.

    Parameters
    Returns
    void

    getColumnData

    getColumnData(column: string, distinct: boolean, success: ICollectionViewResponseHandler): void
    

    Get the whole column data.

    Parameters
    Returns
    void

    onCollectionChanged

    onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
    

    Raises the collectionChanged event.

    Parameters
    Returns
    void

    onError

    onError(e: ErrorEventArgs): void
    

    Raises the error event.

    Parameters
    Returns
    void

    onPageChanging

    onPageChanging(e: PageChangingEventArgs): boolean
    

    Raises the pageChanging event.

    Parameters
    Returns
    boolean

    onQueryComplete

    onQueryComplete(e: QueryCompleteEventArgs): void
    

    Raises the queryComplete event.

    Parameters
    Returns
    void

    onQueryData

    onQueryData(e: QueryEventArgs): void
    

    Raises the queryData event.

    Parameters
    Returns
    void

    onReponseTextParsing

    onReponseTextParsing(e: JSONOperationEventArgs): void
    

    Raises the reponseTextParsing event.

    Parameters
    Returns
    void

    onRequestDataStringifying

    onRequestDataStringifying(e: JSONOperationEventArgs): void
    

    Raises the requestDataStringifying event.

    Parameters
    Returns
    void

    onSourceCollectionChanged

    onSourceCollectionChanged(e?: EventArgs): void
    

    Raises the sourceCollectionChanged event.

    Parameters
    Returns
    void

    refresh

    refresh(): void
    

    Re-creates the view using the current sort, filter, and group parameters. When the data is not cached in client-side, an ajax request will be sent to server side to fecth data.

    Returns
    void

    remove

    remove(item: any): void
    

    Override remove to remove the item from the database. When deleteActionUrl or batch editing is used, an ajax request will be sent to server side to update the data source.

    Parameters
    • item: any

      The item used to be removed.

    Returns
    void

    requestItems

    requestItems(startRow: number, endRow: number): void
    

    Prepare the items from startRow to endRow.

    Parameters
    • startRow: number

      The start row index.

    • endRow: number

      The end row index.

    Returns
    void

    Events

    error

    The error event which raises when there are errors from the server side.

    Arguments
    ErrorEventArgs

    queryComplete

    Occurs when the query requests complete.

    Arguments
    QueryCompleteEventArgs

    queryData

    The event fires when collect the ajax query data.

    Arguments
    QueryEventArgs

    reponseTextParsing

    Occurs when parsing the response text.

    Arguments
    JSONOperationEventArgs

    requestDataStringifying

    Occurs when serializing the request data.

    Arguments
    JSONOperationEventArgs