Skip to content

michele-b/Datatables-OData-v4-plugin

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 

Datatables-OData-v4-plugin

Enables jQuery DataTables to read and display data from an OData service. It support server-side operations like:

  • Pagination
  • Sorting
  • Global and column filtering
  • Numeric, date and string types
  • Range filter for numeric and date types
  • V4 OData support (only)
  • JSONP requests

How to use

$('table#people').dataTable({
    "oDataUrl": "/odata/People",
  	"oDataViaJSONP": false,	// set to true for cross-domain requests
    "oDataAbort": false, // set to true to cancel previous on-going request
    "ajax": ajaxOData,
    "serverSide": true, // set to true for OData server side filtering and sorting 
    "columns": [
      { data: "Id", type: "num" },
      { data: "Name" },
      { data: "Surname" },
      { data: "BirthPlace" },
      { data: "BirthDate", type: "date" }
  	],
});

Notes

  • Type for numeric and date columns must be set in the right way
  • JQuery Globalize is optionally used for number and date parsing

Author

Michele Bersini, inspired from Vida Popovic OData connector (Thanks)

Copyright and license

Copyright 2016 Michele Bersini under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published