Row details with tabs (Show and hide details about a particular record)

Row details with tabs (Show and hide details about a particular record)

phuhai_dtphuhai_dt Posts: 7Questions: 0Answers: 0
edited February 2011 in General
With Row detail in datatable only show texts but I want to use Row detail showed by tabs
As you can see code below, I did it but it did not work as i want (only showed 3 line Customer, contact person and Solution). Please help me
[code]
function fnFormatDetails(oTable, nTr) {
var aData = oTable.fnGetData(nTr);
var sOut = '';
sOut += '';
sOut += '';
sOut += 'Customer';
sOut += 'Contact person';
sOut += 'Solution';
sOut += '';
sOut += '';
return sOut;
}
[/code]

Thanks for your helping me
Looking forward to receiving your reply message

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You need to initialise the tabs somewhere - do you have code to so that at the moment? I presume you are using something rather like my example 'details' code:

    [code]
    var newRow = oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
    [/code]
    Just after it you can initialise the tabs with something like:

    [code]
    $("div.tabs-bottom ul", newRow).tabs();
    [/code]
    Allan
  • phuhai_dtphuhai_dt Posts: 7Questions: 0Answers: 0
    Thanks Allan very much,

    It work well :)
  • phuhai_dtphuhai_dt Posts: 7Questions: 0Answers: 0
    Hi,
    I have a problem with this "Row details with tabs" : in content1.html i initial 1 dialog, so when i span a row, select Customer tab, close this row and span again. It issues 2 dialog with the same ID and for 3 too...

    Please help me!!
  • phuhai_dtphuhai_dt Posts: 7Questions: 0Answers: 0
    edited December 2011
    I resovled it. When close row, find all dialog and remove it

    [code]$('body').find($('#dialog_new_participant'+id_course_click)).remove();[/code]
This discussion has been closed.