your library don't work when work with 2 and 3 lvls of complicated columns as on this example why so

your library don't work when work with 2 and 3 lvls of complicated columns as on this example why so

SergerFuSergerFu Posts: 16Questions: 1Answers: 0

https://gist.github.com/anonymous/2078e75eda225bb37bdb

if i erase one of lvls and got 3 | 3 lvls all ok if i got 2 and same tiime near 3 lvls all crush and this write to me
TypeError: aoLocal[(i + iRowspan)][j] is undefined but i got 4 columns with colspan= 1 at low level .... btw ... i can give you easy way component to make comlicated headers from dynatree to datatables //// now i create way to make 1 lvl headers and replace by my own header after init but it seems to me quet wrong

Answers

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin

    Sounds like you don't have the same number of header cells in the table as you have defined in the Javascript. But without a test case it is quite difficult to say for certain.

    Allan

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    so please can you try https://gist.github.com/anonymous/2078e75eda225bb37bdb example.. also i cannot understand one meaningfull detail... if i make n lower level columns with th colspan= 1 and they putted in different <tr></tr> pls say to me, your table would count that all chunks and make nice looking table or it will be with torn edges

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin

    You need to use the columns.data option to tell DataTables which data point to use for each column. Looking at the way you have it set up you could just use data: null, but you might be better replacing the render option with data in this case.

    also i cannot understand one meaningfull detail... if i make n lower level columns with th colspan= 1 and they putted in different <tr></tr> pls say to me, your table would count that all chunks and make nice looking table or it will be with torn edges

    DataTables does not support colspan or rowspan in the tbody.

    Allan

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    please don't close this question, i'll try to make all right in this 2 days and then close ok???

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    olso i must say very BIG thanks to you for so wonderful lib and i knew that must be such function like columns.data but i had no so much pation to seek it in your shiny realy big documentation sorry that i spent your time.. also i hope i can give you later an small lib to make tests for complex headers if you wanna to

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    also sorry my english it awfull i know that(((

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    seems to me that even with no data Ever used this starts falling with unsimmetrick 2 and 3 lvls of headers branch at time i made data:null and just added tbody so... in usual case table build normal with "no data in table" but with unsimmetric headers it crashes

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    also when i click after it "say
    TypeError: aoLocal[(i + iRowspan)][j] is undefined
    stack trace:
    _fnDrawHead@file:///G:/PollManager/patterns/constructor/js/jquery.dataTables.js:1925:1
    _fnInitialise@file:///G:/PollManager/patterns/constructor/js/jquery.dataTables.js:3278:3
    and then i click any header in headers it start redrawing by _fxRedraw(true) ands seems working after that
    i see all data or
    in experiment when i dont use data or columns ever i see that "no data in datatable" as it must be - if it will give you an some example try it yourself

    check this link

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    this is thead with it not working with any headers

    <tr><th rowspan="4" colspan="1"> </th><th rowspan="1" colspan="1">Средний Бизнес</th><th rowspan="2" colspan="1">Физические Лица</th></tr><tr><th rowspan="1" colspan="1">На финансирование активов2</th></tr><tr><th rowspan="2" colspan="1">На финансирование активов3</th></tr><tr><th rowspan="1" colspan="1">На финансирование недвижимости</th></tr>

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    even without an data or columns or everything

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    look at fist example - it works https://jsfiddle.net/SergerFu/ah350z55/1/

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0
    edited April 2015

    i added 1 more row in right column : https://jsfiddle.net/SergerFu/ygnv62hh/
    hola error ! it stop working with aoLocal[(i + iRowspan)][j] is undefined in

    _fnDrawHead@file:///G:/PollManager/patterns/constructor/js/jquery.dataTables.js:1925:1
    _fnInitialise@file:///G:/PollManager/patterns/constructor/js/jquery.dataTables.js:3278:3
    DataTable/<@file:///G:/PollManager/patterns/constructor/js/jquery.dataTables.js:6551:5
    .each@file:///G:/PollManager/patterns/constructor/js/jquery-1.11.2.js:384:14
    jQuery.prototype.each@file:///G:/PollManager/patterns/constructor/js/jquery-1.11.2.js:136:10
    DataTable@file:///G:/PollManager/patterns/constructor/js/jquery.dataTables.js:6076:3

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    and try to click in last example on any header - it start working ! 0_o ... some bug .... pls . i dont understand how to make it work in second example ... may be you give me wize example how to start it working

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    sorry , here the wrong example https://jsfiddle.net/SergerFu/ygnv62hh/

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    hmm... i looked example https://jsfiddle.net/SergerFu/3mkyorvk/1/ and can propose that all trouble in my html with 2 rows of info ---- but it seems to me that all stand good only at 2 lvls ,not deeper ..

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    seems to me my html not ideal - it have holes.... (((

  • SergerFuSergerFu Posts: 16Questions: 1Answers: 0

    sorry my thead was with hole in right column always
    now it's ok question off
    https://jsfiddle.net/SergerFu/mcgfhufx/

This discussion has been closed.