Implementing expanded row detail

Implementing expanded row detail

Philip HarveyPhilip Harvey Posts: 23Questions: 0Answers: 0
edited August 2009 in General
I am trying to implement the expanded row feature (which is really cool) and just wanted to check my understanding as I have a small problem. Lets say I have an SQL table with 10 fields, I want to show the first 5 fields in the visible datatable (I can do this) and I want to use the expanded row feature to display the other 5. I have modified the code from the example and have a small problem....

So what I think I need to do is

1. Add the additional rows into the table
2. Make these additional columns to the DataTables definition as hidden
3. Change the variables in the detail section of the header to show the new data
[code] sOut += 'Start Point:'+aData[1]+''; [/code]

It seems that I can only get values of +aData+ for the visible columns, is this correct, if so how do I access the data that is not in the visible table

Many thanks
Phil

Replies

  • allanallan Posts: 54,909Questions: 1Answers: 8,606 Site admin
    Hi Phil,

    I've just tried this myself using a modified version of my demo (to hide the column that I use for rendering) and it appears to work no problem. If you are using Firebug it might be interesting to output 'console.dir(aData)' and see what that shows. If there is nothing obvious, could you post a link or your code? It certainly should work - I've used it a number of times myself.

    Actually - one thought that springs to mind - did you remember to add the new TH elements to your header required for the new table columns?

    Regards,
    Allan
  • Philip HarveyPhilip Harvey Posts: 23Questions: 0Answers: 0
    Thanks Allan, you were spot on again. I had forgotten to add the tags for the hidden rows.

    Many thanks again
    Phil
This discussion has been closed.