Drill-down data - Page 3

Drill-down data

13»

Replies

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Your HTML is completely invalid.

    > "rowspan=2"

    should be:

    > rowspan="2"

    And a closing is missing for the second row.

    http://live.datatables.net/aXIr/3/edit

    Allan
  • lfreylfrey Posts: 4Questions: 0Answers: 0
    Unless something is messed up with my browser, that does not change how the table is rendered at all; the top row of column headers are still offset.
  • vnanithavnanitha Posts: 1Questions: 0Answers: 0
    Hi Alan,
    I have used your code to have drill down option. Instead of creating a div in the function fnFormatDetails, i need to create another data table dynamically. is it possible?
    Thanks,
    Anitha
  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    @lfrey - sorry I missed your post before. Please link to a test case showing the problem.

    @ Anitha - Sure - just put the table into the HTML and then initialise the new DataTAble.

    Allan
  • TheEmperorTheEmperor Posts: 1Questions: 0Answers: 0
    Hey,

    I am using the drill down option and it works with my table, it's great. But I am trying to integrate a dataTable inside the dataTable... So basically, inside the outer dataTable, I click on the + button, to slide down the inner content, and inside the inner content is another dataTable.

    so I know it's complicated, but is it possible?
    I've been trying for hours to no avail.

    Here's the test site:
    http://modernguild.com/sites/all/modules/guild/mg/jquery-datatable/course.php

    And here's the code:
    view-source:http://modernguild.com/sites/all/modules/guild/mg/jquery-datatable/course.php

    The code is too long to post here, sorry :(
  • leeguthleeguth Posts: 19Questions: 1Answers: 0
    I got this working with data coming from a database. And I got it to work so there is a DataTable inside a DataTable. What I would like to know is how do I update the table information for a field I would normally calculate? For instance....I am displaying a list of programs and each program can have projects associated with it. My first DataTable shows a list of the programs, and then you can drill down to the projects. If I want to add on the program line the number of projects associated with the program, how would I add that? The number is not stored in the database. Before I got the DataTable working as you showed, I was able to call a function as I was creating the table but was doing that line by line. Can I somehow add a function to the ajax call for the field? (I added a field called prg_count thinking I could).

    Here is my ajax call:
    $.ajax({
    url:"data.php",
    dataType:"json",
    data:{
    "action":"activePrograms"
    },
    success:function(data){
    oTable = $('#example').dataTable( {
    "bProcessing": true,
    "aaData": data,
    "aoColumns": [
    {
    "mData": null,
    "sClass": "control center",
    "sDefaultContent": ''
    },
    { "mData": null,
    "sName" : "prg_count"},
    { "mData": "prg_name" },
    { "mData": "market" },
    { "mData": "beta_date" },
    { "mData": "rtc_date" },
    { "mData": null,
    "sName" : "prg_cpro"}
    ]
    } );
    }
    } );
  • leeguthleeguth Posts: 19Questions: 1Answers: 0
    I wanted to add some more information....in order to get the the prg_count value, I need to use a field coming back in the ajax call (in the data.php). There is a field there that I am not displaying in the table that is used in the function that produces the prg_count value. Is there a way for me to use that field to call a function to set the column for each row? Not sure how to reference the field value that is in 'data'.
  • leeguthleeguth Posts: 19Questions: 1Answers: 0
    figured out how to do what I wanted with the mRender....thanks.
  • bcgarciabcgarcia Posts: 2Questions: 0Answers: 0
    Hi everybody.

    is possible that when I click on the row and the div appears, instead of a div appearing new rows making a ajax call??
This discussion has been closed.