Sorting errors! Cross-Browser Compatibility

Sorting errors! Cross-Browser Compatibility

danielgiletadanielgileta Posts: 4Questions: 0Answers: 0
edited August 2010 in Bug reports
hello all!
im new with datatables, i found it awesome and thanks to the creator =D

well im having a big/small issue.. I can't sort the ID column in Internet Explorer, Firefox while in Google Chrome i can,, but i need it to work in Internet Explorer..
The error is when i add the code to column sorting = numeric .... my code:

[code] $(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
//For scrolling
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
//End for scrolling
//Sorting Numeric Type

"aoColumnDefs": [ { "sType": "numeric", "aTargets": [ 0 ] } ]

// End sorting type
}); [/code]

Thanks in advance.

Replies

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    The numeric datatype will be detected automatically - if it isn't detected automatically, but you force it to be numeric, then funny things might happen. Needing to set it to numeric would suggest that you have non-numeric data (html, punctuation, currency something) in the column somewhere which is preventing the automatic type detection.

    Allan
  • danielgiletadanielgileta Posts: 4Questions: 0Answers: 0
    Well, i haven't modified anything, if The numeric datatype is detected automatically why i get:

    1
    14
    2
    3
    4
    45
    5

    Without this code
    [code]"aoColumnDefs": [ { "sType": "numeric", "aTargets": [ 0 ] } ] [/code]
    Sorting works, but not as numeric type. Am i wrong in something, or do you know the solution? Thanks in advance
  • danielgiletadanielgileta Posts: 4Questions: 0Answers: 0
    I think that something is wrong with the code
    [code]"aoColumnDefs": [ { "sType": "numeric", "aTargets": [ 0 ] } ][/code]
    Because in Google Chrome works fine, but not in Internet Explorer. ):
  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    As seen on the fourth column in this example - http://datatables.net/ - numeric type detection should work fine. It sounds to me like there is a non-numeric character in the column somewhere. Can you provide a link to a page showing the issue, or the HTML for the table please.

    Allan
  • danielgiletadanielgileta Posts: 4Questions: 0Answers: 0
    D: I don't have it in the web, its for a private system in a company. in Mexico
This discussion has been closed.