Skip to content

I think name should try to be parsed BEFORE data. Here is why: #41

@VictorioBerra

Description

@VictorioBerra

https://github.com/AlexanderKrutov/DataTables.Queryable/blob/master/DataTables.Queryable/DataTablesRequest.cs#L173-L199

Because of the way DataTables.Queryable (DTQ) works with EF models directly, we usually AutoMapper back these results. This can lead to the return ViewModel being very different than the Entity.

Right now, jQuery DataTables uses columnDefs.data to try and traverse the actual data it gets back from the server. But name is different.

I want to be able to do:

{
    columnDefs:
    [
        {
            name: "Entity.ActualNavigationProperty"
            data: "ReturnViewModel.Property" 
        }
    ]
}

Hopefully this is clear. name is used so when DTQ tries to traverse the actual properties to search and configure custom column searchs and all that and then data is used by jQuery DT to traverse the returned viewmodel.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions