Char = sData.charAt(0); from v1.5 beta 11
Char = sData.charAt(0); from v1.5 beta 11
kiko
Posts: 10Questions: 0Answers: 0
Hi, im just newbie for this jquery datatables. I recived error sData is undefined [Break on this error] Char = sData.charAt(0);
jquery.d...Tables.js (line 513)
below is the code:
[code]
<%@ include file="header.jsp"%>
List of Suppliers searched for All between the date range 21-JUN-2008 and 21-JUL-2008
Total POs: ${poCount}
Total RFQs: ${rfqCount}
Total QOTs: ${qotCount}
DataTables individual column filtering example
Company Type
TNID
Branch Name
Country
No of POs
No of RFQs
No of QOTs
No of Buyer That Sent POs
Interface
${stat.companyType}
${stat.tnid}
${stat.branchName}
${stat.country}
${stat.poCount}
${stat.rfqCount}
${stat.qotCount}
${stat.buyerSentPOCount}
${stat.companyInterface}
Total:
${poCount}
${rfqCount}
${qotCount}
[/code]
jquery.d...Tables.js (line 513)
below is the code:
[code]
<%@ include file="header.jsp"%>
List of Suppliers searched for All between the date range 21-JUN-2008 and 21-JUL-2008
Total POs: ${poCount}
Total RFQs: ${rfqCount}
Total QOTs: ${qotCount}
DataTables individual column filtering example
Company Type
TNID
Branch Name
Country
No of POs
No of RFQs
No of QOTs
No of Buyer That Sent POs
Interface
${stat.companyType}
${stat.tnid}
${stat.branchName}
${stat.country}
${stat.poCount}
${stat.rfqCount}
${stat.qotCount}
${stat.buyerSentPOCount}
${stat.companyInterface}
Total:
${poCount}
${rfqCount}
${qotCount}
[/code]
This discussion has been closed.
Replies
[code]
DataTables individual column filtering example
Company Type
TNID
Branch Name
Country
No of POs
No of RFQs
No of QOTs
No of Buyer That Sent POs
Interface
STARTGROUP
51596
Goltens Hong Kong Ltd.
HK
0
1
0
0
STARTSUPPLIER
STARTGROUP
52712
Elcome International
AE
1
0
0
1
STARTSUPPLIER
CONTRACTED
52903
Fuji Trading (Singapore) Pte. Ltd.
SG
0
3
0
0
INTEGRATION
STARTGROUP
59026
S & W Heat Exchangers
SG
0
1
0
0
STARTSUPPLIER
[/code]
sData is undefined
[Break on this error] for ( i=0 ; i
You have TH elements in the TBODY. Try changing them to TD.
It is actually valid to have TH in the body, but, DataTables expects there to only be TD elements for simplicity.
Regards,
Allan
If you want to move the search box around the table itself you can use the sDom parameter ( http://datatables.net/usage#sDom ), however if you want to move the filter far away from the table, you'll need to make use of the fnFilter() API function and add an event handler to the input box that you put in the HTML.
Allan
sDom demo: http://datatables.net/examples/example_dom.html
Filtering demo: http://datatables.net/1.5-beta/examples/api/regex.html
Custom paging: http://datatables.net/plug-ins#pagination (you would need to write your own plug-in is sDom doesn't provide enough control for the DOM location).
Allan
I have also encountered the same bug but in different situation,
My table have no inner-html and is totally dynamically created, when I insert the data into table an error occurs on line 514 Char = sData.charAt(0); when I killed this part by placing return null on line 507 everything work fine.
Part where I add data to table
[code]success: function(xml) {
var data = $(xml).children("response:first").text();
var rows = eval('(' + data + ')');
if(tbl != null) {
tbl.fnClearTable(0);
tbl.fnAddData(rows[1]);
}
}
// rows[1] part is 2D array looks like this
// [ [ r11, r12 ] , [ r21, r22 ] , [ r31, r32], ... [ rn1, rn2] ]
[/code]
This code was working fine in version 1.4.3 then in 1.5 beta 7 but in 1.5 beta 11 isnt working. :-)
Luda Ameba
A
Have a look at the example here for sLengthMenu: http://datatables.net/usage#oLanguage.sLengthMenu
If you give -1 as the length to display it will show all.
Allan