Code Monkey home page Code Monkey logo

namoshek / datatables.netstandard Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 982 KB

Self-containing DataTable classes for the datatables.net jQuery plugin that manage rendering, querying, filtering, sorting and other desireable tasks for the user.

License: MIT License

C# 94.23% HTML 4.67% CSS 0.89% JavaScript 0.18% Twig 0.03%
csharp netstandard netcore datatables-serverside datatables-ajax jquery datatables jquery-datatables query-builder

datatables.netstandard's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar namoshek avatar nino-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nino-s bubdm brocy

datatables.netstandard's Issues

Default ordering on first access cannot be changed

The definition of DataTablesColumn opens the possibility to add a "default" sorting order by changing OrderingIndex and OrderingCaseInsensitive. But those options are not parsed in the initial request. Therefore the request is build upon the table which has the default option "order by first column ascending". The options should be inside the script to avoid this, shouldn't they?

Reproduction:

  • Build a table
  • Define a ordering not to first column
  • Access the site and you will see that default ordering is still on first column

Ordering by expression which is used directly

There are two different possibilities to set the ordering property:

  • Default -> Property name is taken
  • ColumnOrderingProperty -> Property name is taken

In both scenarios the property name is taken for the OrderBy in

var propertyName = c.ColumnOrderingProperty != null
? c.ColumnOrderingProperty.GetPropertyPath()
: c.PrivatePropertyName;
queryable = (IDataTablesQueryable<TEntity, TEntityViewModel>)queryable.OrderBy(propertyName, c.OrderingDirection, c.OrderingCaseInsensitive, alreadyOrdered);

Isn't it possible to set a real expression, which is directly parsed as OrderBy? With this feature it would be possible to set more complex ordering logic.

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.