Colspan

Colspan

MuthuKumarinfoMuthuKumarinfo Posts: 9Questions: 0Answers: 0
edited December 2012 in Editor
Can we do Colspan in the datatable or else can anyone help me out with a sample working model with the jsfiddle link

Thanks,

Replies

  • girishmrgirishmr Posts: 137Questions: 0Answers: 0
    edited December 2012
    Colspan is allowed only in thead. Not supported in tbody
  • MuthuKumarinfoMuthuKumarinfo Posts: 9Questions: 0Answers: 0
    Is there any fair ideas to use colspan inside tbody can i have any good suggestions for that!!
  • AkhorAkhor Posts: 6Questions: 0Answers: 0
    I just wrote come code to handle this issue. Check out this thread..

    http://datatables.net/forums/discussion/13163/is-it-possible-to-set-a-cell-class-and-colspan-in-aadata#Item_3
  • RoyLingRoyLing Posts: 26Questions: 0Answers: 0
    edited December 2012
    You may register a callback to manually add colspan attr to the cells. For example, in fnRowCallback I removed the other cells in the specific rows except the first one, and then set the 'colspan' attr:
    [code]
    $('#your_table').dataTable({
    "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
    var iCol = $(nRow).children('td').length;
    $(nRow).children('td:gt(0)').remove(); // remove placeholder cells, which should be empty only
    $(nRow).children('td:first').attr('colspan', iCol);
    },
    // your other init settings...
    });
    [/code]
  • MuthuKumarinfoMuthuKumarinfo Posts: 9Questions: 0Answers: 0
    Hi Folks, And i have an another issues States as follows!!!
    In ColVis 1.0.6dev, I've noticed that if 'Enter' is pressed in a textbox input control, AND there are no other submit buttons having positional priority over the ColVis_Button (based on the browser's definition of default submit button priority), then ColVis_Button's 'click' event is triggered, and handled here:
    "_fnDomBaseButton": function(text) {
    ...
    $(nButton).bind(sEvent, function(e) {
    that._fnCollectionShow();
    e.preventDefault();
    });
    ...
    }
    so the ColVis checkbox list appears and the default submit action is cancelled. Obviously, having over-riding submit button(s) will circumvent this behavior, but I thought I'd mention it, in case you find it helpful.
  • MuthuKumarinfoMuthuKumarinfo Posts: 9Questions: 0Answers: 0
    edited January 2013
    Hi all,
    I am new to ColVis ,If i Hides a column using ColVis, and now i want to use the data of the hidden column from where i can read that data. Any ideas or methods regarding this ..

    Thanks,
    Muthu
This discussion has been closed.