Git Product home page Git Product logo

datatables-odata-v4-plugin's Introduction

#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, bool and string types
  • Range filter for numeric and date types
  • V4 OData support (only)
  • JSONP requests

How to use

var {ajaxOData}= require('path/to/jquery.dataTables.odata-v4.js');

$('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
    "oDataSrc": 'Results', // default as "value"
    "oDataCount": 'Count', // default as "@odata.count"
    "oDataSelect": ['OwnerClientId', 'CourseId', 'GradeScaleId', 'RequiredSubjectId'], // additional columns to load
    "ajax": ajaxOData,
    "serverSide": true, // set to true for OData server side filtering and sorting 
    "columns": [
      { data: "Id", type: "num" },
      { data: "Active", type: "bool" },
      { 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 required

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

##Copyright and license Copyright 2016 Michele Bersini under the MIT license.

datatables-odata-v4-plugin's People

Contributors

michele-b avatar x420 avatar zgldh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.