Scrolling in a jQuery constructed table

Scrolling in a jQuery constructed table

Hello:

My application has a jQuery constructed table, that works quite well. But... I can't get the <tbody to scroll. No matter what I do. Whether I use CSS or inline styling, the scrolling doesn't work. And I'm wondering if it's not picking up max-height and scroll settings because the table is constructed with jQuery. You can see how the table is constructed in this thread. Following are the applicable scripts:

HTML table w/inline styling:

  1. <table id="GroupList" class="layout">
  2. <tbody style="background:yellow; overflow-y: scroll; overflow-x: hidden; max-height: 100px;"></tbody>
  3. </table>
The table is picking up the background setting, because the table body is yellow: But... the table does not pick up the max-height setting, nor does it pick up the overflow settings.

Following is the jQuery used to build the table:

rowBuilder(data) function
  1. function rowBuilder(data) {
  2.       return '<tr>'
  3.             + '<td class="b_lay">'
  4.  + data.GroupName
  5.             + '</td>'
  6.             + '<td>'
  7.                   + data.Grp_CreateDate
  8.             + '</td>'
  9.  + '<td>'
  10.  + '<button type="button" class="toggle_Bttn" value=' + data.GroupID + '>Members</button>'
  11.       + '</tr>';
  12. }

$('#new_OrgGrp_Save').click(function()
  1. $('#new_OrgGrp_Save').click(function() {
  2. var NewOrgGrp = $('#new_OrgGrp').val();
  3. $('#new_OrgGrp').val("");
  4. $.post("org_users_data4.php",{bind_NewGrp:NewOrgGrp},function(data){
  5. $("#GroupList > tbody").empty();
  6. $('#GroupList').append(HeaderRow);
  7.  $.getJSON("org_users_data4.php", function(data) {
  8. $.each(data, function(i, val) {
  9. $('#GroupList').append(rowBuilder(val)); //======== See custom.functions.js for rowBuilder() ============
  10. });
  11.  });
  12. });
  13. });

So... is it possible that the construction process is interfering with the <tbody> ability to pick up overflow and max-height settings????

Any insight from folks here would be greatly appreciated.

Thanks Much:

Pavilion