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

Child rows issue with server side #1657

Closed
joseserrano15 opened this issue May 27, 2022 · 5 comments
Closed

Child rows issue with server side #1657

joseserrano15 opened this issue May 27, 2022 · 5 comments

Comments

@joseserrano15
Copy link

Hello. I'm trying to implement child rows, but when I use server side its not working because the child data is show bottom the table. If I use static data its work perfectly, only fails with server side. Any idea what could be the problem?

Child row with server side
image

Child row with static data
image

ServerSide code
image

  • NodeJS version: 16.13.1
  • Angular version: 10.1.5
  • Angular CLI version: 10.1.5
  • jQuery version: 3.5.1
  • DataTables version: 1.10.18
  • angular-datatables version: 11.1.1
@advapiIT
Copy link

advapiIT commented Jul 8, 2022

Hello,
I've got the sasme problem here, where you able to resolve?

Thanks

@joseserrano15
Copy link
Author

Yes, I could resolve it. You need to use rowCallback.

image

image

_renderer variable is private _renderer: Renderer2

@joseserrano15
Copy link
Author

I forgot it, the ajax callback must be:

callback({
recordsTotal: resp.recordsTotal,
recordsFiltered: resp.recordsFiltered,
data: resp.data
});

Not like the example
callback({
recordsTotal: resp.recordsTotal,
recordsFiltered: resp.recordsFiltered,
data: []
});

@advapiIT
Copy link

advapiIT commented Jul 8, 2022 via email

@joseserrano15
Copy link
Author

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

No branches or pull requests

3 participants