Before I reinvent the wheel.[Revised]

Before I reinvent the wheel.[Revised]

UrbanUrban Posts: 5Questions: 0Answers: 0
edited July 2012 in General
I am using DataTables to display a list of members from a database. I want some way "showing more info" about each row. Is there a way when clicked I can have a row appear below the selected row. Or have some overlay to show more data from the database?

I am using php. I also have jqueryui and jquery installed.

**I have never used AJAX or JSON. When I try to put this on my data table I loads at processing. I feel my problem is the "sAjaxSource"

What do I set this to if the data I get from my db is in a php array?

Replies

  • snarf2larfsnarf2larf Posts: 64Questions: 0Answers: 0
    See this example: http://datatables.net/release-datatables/examples/server_side/row_details.html
  • UrbanUrban Posts: 5Questions: 0Answers: 0
    edited July 2012
    Almost what I am after
  • UrbanUrban Posts: 5Questions: 0Answers: 0
    I have it on my page but it hangs at processing. Does that mean there is somthing wrong with my server_processing.php?
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Most likely yes. Probably not returning the expected sEcho value.

    Allan
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Do you actually need server-side processing? Would client-side be good enough (<50'000 rows): http://datatables.net/release-datatables/examples/api/row_details.html

    Allan
  • UrbanUrban Posts: 5Questions: 0Answers: 0
    Thank you Allan, This works perfect for my needs and is functioning!
  • UrbanUrban Posts: 5Questions: 0Answers: 0
    Just for understanding, I see the aData[] array refers to my query properly. But did I tell it to use this somewhere?
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Do you mean the property from the object that is used to get the data - aaData?

    This is the default property DataTables uses, and can be modified with sAjaxDataProp .

    Allan
This discussion has been closed.