3.2.0

Sorting Dates which has BLANK values

Hi all :)

As per the forum.. Alex said:

you can specify the error text this way:
date.setErrorText(" ");
for the correct sorting you have to apply the patch:
/javascript.forum.1252.8/active-formats-date-fix.html
then you can set error value which will be used for sorting:
date.setErrorValue(0);

I did the above..but when i click on the date column the soort is not correct with blank values staying the midde of rows that has date values..the blank values should really go either on the top or bottom of list.

Can someone PLEASE help me..i am missing something here, as others have said the above mentioned fix from Alex worked for them..

I know the date sort works when i do not have any blank values.

Thank you


Seeker
March 1,
HI all..

I ahad to add the following to get it to work with blank dates..

//sorting bug fix for blank spaces
obj.setDataProperty("value", function(i,j)
{
var kk = myArray[i].split("|");
var text = "" + formats[j].dataToValue(kk[j])
//var text = "" + this.getDataText(i, j);
if (text.match(/^\s*$/)) {return ""}
var value = Number(text.replace(/[ ,%\$]/gi, "").replace(/\((.*)\)/, "-$1"));
return isNaN(value) ? text.toLowerCase() + " " : value;
});

PS myArray holds the contents of the row i display in my grid
seeker
March 1,
Hey seeker could you please post your final code for the whole date sorting dilema i would really like to see it all to gether
thanks,
Flan
June 19,

This topic is archived.

See also:


Back to support forum