Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of support of DataTable with nested objects in datasource #250

Open
serralha85 opened this issue Jul 25, 2016 · 0 comments
Open

Lack of support of DataTable with nested objects in datasource #250

serralha85 opened this issue Jul 25, 2016 · 0 comments

Comments

@serralha85
Copy link

When using datatable

$('#gasTable').puidatatable({
paginator: {
rows: 50
}
, columns: [
{ field: 'name', headerText: 'Name', sortable: true, filter: true, filterMatchMode: 'contains' },
{ field: 'supplier.idSupplier', headerText: 'Name Supplier', sortable: true, filter: true, filterMatchMode: 'contains' }
]
, sortMode: 'multiple'
, selectionMode: 'single'
, draggableColumns: false
, responsive: true
, datasource: function (callback) {
$.ajax({
type: "GET",
url: '/GasStation/GetGasStations',
dataType: "json",
context: this,
success: function (response) {
callback.call(this, response);
}
});
}
});

Data source is
[
{"idGasStation":31,"name":"185540. TAVEL","supplier":{"idSupplier":828,"idClient":0,"code":"","name":"VelocityFleet","local":null,"zipCode":null,"address":null,"MORLOCALE":null,"CODPOSTALE":null,"MORADAE":null,"country":null,"fiscalNumber":null,"contact":null,"phone":null,"fax":null,"email":null,"obs":null,"idCompany":0,"tableName":"ComCfgFornecedores"}},
{"idGasStation":60,"name":"A GUDIÑA","supplier":{"idSupplier":225,"idClient":0,"code":"","name":"ADS - BADAJOZ DIESEL SERVICE SL","local":null,"zipCode":null,"address":null,"MORLOCALE":null,"CODPOSTALE":null,"MORADAE":null,"country":null,"fiscalNumber":null,"contact":null,"phone":null,"fax":null,"email":null,"obs":null,"idCompany":0,"tableName":"ComCfgFornecedores"}}
]

I want to access supplier.idSupplier and it doesn't support it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant