wjshohs: fnShowHide
wjshohs: fnShowHide
Originally from wjshohs, following on from http://datatables.net/forums/comments.php?DiscussionID=2815:
I also found the bug with fnShowHide function
You could see the same page, and when JS starts this function i have
an error:Node was not found" code: "8
[Break on this error] j(">td:eq("+i+")",c.aoData[d].nTr)[0])...unction(){var a=B(this[m.iApiIndex]),
And I know why it happens. 'because of in first before the columns listing i have
of 15
if I move it in thead after the tr with th list - all is ok. But i need it before the columns list because of design. Could I handle with it?
I found that I could try to use new table before the datatable table, but to have a connection with datatable columns in sense of using colspan I need constantly get ColumnsWidth from there and set it to the columns of upper table. but all actions are into datatables library. and to do it I need to hack your lib which is not good with the context of using the updates
I also found the bug with fnShowHide function
You could see the same page, and when JS starts this function i have
an error:Node was not found" code: "8
[Break on this error] j(">td:eq("+i+")",c.aoData[d].nTr)[0])...unction(){var a=B(this[m.iApiIndex]),
And I know why it happens. 'because of in first before the columns listing i have
of 15
if I move it in thead after the tr with th list - all is ok. But i need it before the columns list because of design. Could I handle with it?
I found that I could try to use new table before the datatable table, but to have a connection with datatable columns in sense of using colspan I need constantly get ColumnsWidth from there and set it to the columns of upper table. but all actions are into datatables library. and to do it I need to hack your lib which is not good with the context of using the updates
This discussion has been closed.
Replies
However, I can say that the problem, as you rightly point out, is likely the colspan. This post covers the visibility toggling of columns with colspan: http://datatables.net/forums/comments.php?DiscussionID=2897&page=1#Item_2
Allan
To get the column width, you can just use a bit of jQuery $('#example thead th:eq(0)).width().
Allan
after the page loaded , I make inspect element by firebug and have:
so script adds style="width: 20px;". So could it possible to handle with it?
All this things with the horizantol scrolling
And the other question i want to ask U - how could I run any function AFTER anyone of datatables actions ran?
Do you have some calls like afterDatatablesEvents?
For example - i'm using some checkbox jquery plugin. After the data loads to the table with the new checkboxes element - every time i need to load checkbox initialization function. Is there some ability to do it?
Anyway such ability would be great! If you have no such after actions for your events - would be great to add this.
With all due respect
For your other question: http://datatables.net/usage/callbacks#fnDrawCallback
Allan
Is it possible to not use request to sAjaxSource when I'm using fnSetColumn? because of every time I'm reloading the same data.
2) Also why after hiding some columns - i still have the old ScrollXInner width and columns which are still unhided get bigger width that they had before? is it possible to stay them with old width and to make scroll area smaller? you could see it on my page if you will use "select columns" button
Also when I setup for all columns fixed width with pixels and doing hiding\unhiding columns with scrolling than if i use setuped sScrollXInner param - than columns that left - they makes wider and the scroll inner area stay with the same width. And if i'm not using sScrollXInner - then I have no actual widths for columns which I setuped before in
and if bAutoWidth is true than scroll inner area comes smaller - but it is working only if sScrollXInner is not setuped. but without it setuped - columns have wrong width