proper displaying of data and sorting...

proper displaying of data and sorting...

sleepingtigersleepingtiger Posts: 13Questions: 8Answers: 0

I am using render to display the number of days past a deadline, but the underlying data field is a date. i would like to preserve the date as it is only displaying N number of days using this:
columns: [
{
data: null, render: function (DeadlineDataRow, type, full, meta) {
var daydiff = myself._DaysInBetween(new Date(), DeadlineDataRow.DeadlineDate);
if (daydiff < 0) {
var daylabel = myself.get_DaysAgoLabel().replace("{0}", (-daydiff).toString());
return '

' + ' ' + daylabel;
}
else {
return myself.get_DaysLeftLabel().replace("{0}", (daydiff).toString());
}
}, name: 'date'
}
]

Is this the proper use!? How do i sort on the underlying date... but only display a string... ?

Answers

  • sleepingtigersleepingtiger Posts: 13Questions: 8Answers: 0

    In the past i had used the property: "bUseRendered": false to signify this i believe... how is it it done in v 10?

  • sleepingtigersleepingtiger Posts: 13Questions: 8Answers: 0

    Ok i now understand the type==='display' condition you have as an example... But now the question is how do i sort on Date? If the underlying type is a Javascript date object... how do i represent filtering on it?

This discussion has been closed.