Decimal Sorting Problem and Plugin Help
Decimal Sorting Problem and Plugin Help
marioangulo
Posts: 5Questions: 0Answers: 0
I have the following code done in asp the problem is it doesn't seem to want to sort the second column correctly which contains decimals. I read about using plugins to resolve this issue, but Im not a 100 percent on how to go about doing this for my code. Any help would be appreciated.
[code]
$(document).ready(function() {
$('#myTable').dataTable( {
"bJQueryUI": true,
"oLanguage": {
"sLengthMenu": 'Display '+
'10'+
'50'+
'100'+
'All'+
' records'
},
"sScrollY": "460px",
"bFilter": false,
} );
} );
<%
For i = 0 to Ubound(hdVals)
if i = 0 then
response.Write "" & hdVals(i) & "" & vbnewline
elseif i = 1 then
response.Write "" & hdVals(i) & "" & vbnewline
else
dstrVals(i-2,0) = hdVals(i)
response.Write "" & hdVals(i) & "" & vbnewline
end if
Next
%>
<%
EO = "odd"
For i = 1 to Ubound(tmpRows)-1
if EO = "odd" then
response.Write "" & vbnewline
else
response.Write "" & vbnewline
end if
tmpRowVals1 = split(tmpRows(i),"=")
tmpRowVals = split(tmpRowVals1(1),":")
For j = 0 to Ubound(tmpRowVals)
if j = 0 then
response.Write "" & tmpRowVals(j) & "" & vbnewline
elseif j = 1 then
if trim(tmpRowVals(j)) = "" then
response.Write " " & vbnewline
else
response.Write "" & tmpRowVals(j) & "" & vbnewline
end if
else
Call addToDistChart(j-2,tmpRowVals(j))
gTime = hdVals(j)
response.Write getCellColorWithClick(curlv(tmpRowVals(j)),tmpRowVals(0),gSec,gChar,gTime)
end if
Next
response.Write "" & vbnewline
if EO = "odd" then
EO = "even"
else
EO = "odd"
end if
Next
%>
[/code]
Sample image of what I have so far:
http://tinypic.com/r/9hhppy/7
[code]
$(document).ready(function() {
$('#myTable').dataTable( {
"bJQueryUI": true,
"oLanguage": {
"sLengthMenu": 'Display '+
'10'+
'50'+
'100'+
'All'+
' records'
},
"sScrollY": "460px",
"bFilter": false,
} );
} );
<%
For i = 0 to Ubound(hdVals)
if i = 0 then
response.Write "" & hdVals(i) & "" & vbnewline
elseif i = 1 then
response.Write "" & hdVals(i) & "" & vbnewline
else
dstrVals(i-2,0) = hdVals(i)
response.Write "" & hdVals(i) & "" & vbnewline
end if
Next
%>
<%
EO = "odd"
For i = 1 to Ubound(tmpRows)-1
if EO = "odd" then
response.Write "" & vbnewline
else
response.Write "" & vbnewline
end if
tmpRowVals1 = split(tmpRows(i),"=")
tmpRowVals = split(tmpRowVals1(1),":")
For j = 0 to Ubound(tmpRowVals)
if j = 0 then
response.Write "" & tmpRowVals(j) & "" & vbnewline
elseif j = 1 then
if trim(tmpRowVals(j)) = "" then
response.Write " " & vbnewline
else
response.Write "" & tmpRowVals(j) & "" & vbnewline
end if
else
Call addToDistChart(j-2,tmpRowVals(j))
gTime = hdVals(j)
response.Write getCellColorWithClick(curlv(tmpRowVals(j)),tmpRowVals(0),gSec,gChar,gTime)
end if
Next
response.Write "" & vbnewline
if EO = "odd" then
EO = "even"
else
EO = "odd"
end if
Next
%>
[/code]
Sample image of what I have so far:
http://tinypic.com/r/9hhppy/7
This discussion has been closed.
Replies
[code]
$(document).ready(function() {
$('#myTable').dataTable( {
"bJQueryUI": true,
"oLanguage": {
"sLengthMenu": 'Display '+
'10'+
'50'+
'100'+
'All'+
' records'
},
"sScrollY": "460px",
"bFilter": false,
"aoColumns": [
null,
{ "sType": 'numeric' },
null,
null,
null,
null,
null,
null,
null,
null
]
} );
} );
[
[/code]
It sorts the second row instead of the column which is really weird.
Allan