Placing form objects in the ui-widget-header

Placing form objects in the ui-widget-header

robertrobert Posts: 2Questions: 0Answers: 0
edited September 2011 in General
I'm trying to place a form field, just a checkbox, into the table header, but I'm not having much luck. I'm initially trying to just get some HTML text in there using Datatables custom DOM additions example,

http://datatables.net/release-datatables/examples/advanced_init/dom_toolbar.html

...but it seems to be failing.

$(document).ready(function() {
$('#recordings').dataTable({
"bRetrieve": true,
"bJQueryUI": true,
"sScrollY": "240px",
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"sDom": '<"toolbar">frtip'
});
$("div.toolbar").html('This is where my checkbox html will go');
});

Is there something else I need to included somewhere? Currently, it's creating the "toolbar" , but it is on top of the regular table header div and is styled with just a grey background. Also, it's removing any style that my table header used to have. So instead of rendering inside my table header with my Search control, it is outside of the header and destroying my header styles.

Anything pop out that I'm missing?

Replies

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin
    So you want the checkbox in a cell in the table header - is that correct? You can just put the HTML you want into the TH cell, or am I missing something?

    If you can post a link that would be most helpful.

    Allan
  • robertrobert Posts: 2Questions: 0Answers: 0
    edited September 2011
    Well, I tried just injecting it into the , but that's not really where I'd like it to go. There is another table section above the that is a generated . It has several classes associated to it, but the one I think I need to reference is called ui-widget-header. I would like my check box to go in there, but can't seem to figure out how to get it in there.

    unfortunately I can't post a link to this since it's a secured application.
This discussion has been closed.