Need help with child rows - Page 2

Need help with child rows

2»

Answers

  • StanRStanR Posts: 63Questions: 11Answers: 1

    i get all the fields when i use a json file. but here my data is in a database.

  • StanRStanR Posts: 63Questions: 11Answers: 1

    all my fields are in one db table.

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    Your server script’s db query is the ace to look. Does it include the fields you want?

  • StanRStanR Posts: 63Questions: 11Answers: 1

    i think so. if i select * in a query of that table, i get all the columns i need.

  • StanRStanR Posts: 63Questions: 11Answers: 1

    i don't think i know what script you're referring to.

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947
    Answer ✓

    i don't think i know what script you're referring to.

    The script that is called in the Datatables AJAX URL. That is the script making the query and returning the data. Sounds like the query needs to be modified to include the additional fields you want displayed in the child detail rows.

    Kevin

  • StanRStanR Posts: 63Questions: 11Answers: 1

    That was it. Thanks so much.

    Kevin, do you work for DataTables? I'm wondering if I owe a support charge.

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    You are welcome. Glad its working now.

    do you work for DataTables?

    No I don't.

    I'm wondering if I owe a support charge.

    No you don't :smile:

    Kevin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @StanR ,

    A good way would be to check the network tab on the developer area of the browser, then you can see what the server is sending to the webclient. You could also try JSON.stringify(d), that would show the contents of the object.

    What Kevin and I have been trying to understand is whether the object being returned, matches what you're you expect it to be. In your format function, you're accessing d.explanation and d.groovydoc, so we'd expect to see those properties inside the objects being returned.

    Cheers,

    Colin

  • StanRStanR Posts: 63Questions: 11Answers: 1

    I understand now. Thanks, guys.

This discussion has been closed.