:: Forum >>

Using AW.Formats.Number

I have a AW column containing values 1/1, 1/2,...1/10, 2/1,2/2,...2/20 etc.
I tried using:
var obj = new AW.Formats.Number;
obj.dataToValue1 = obj.dataToValue;
obj.dataToValue = function(data){
return data ? this.dataToValue1(data) : "";

But it displays "1/1, 1/2,....2/1, 2/2,....1/10, 2/20";
But I expected after 1/9, 1/10 would come, but after 1/9, 2/1 came.

Is there a solution with AW for handing this sorting
I really appreciate your help.
Friday, January 9, 2009
You need to write your own textToValue or dataToValue method depending on whether you use setCellText() or setCellData() methods to assign the data to the grid.
Alex (ActiveWidgets)
Tuesday, January 13, 2009
Thanks Alex for your reply.
I was also thinking on the same lines, but was not sure.
As the actual AW functions datatoValue, I think converts 1/2 to 12, and 1/10 to 110, and then displays, so sorting was not done as I expected. I would be writing a new function to sort the values as per my requirement.
Tuesday, January 13, 2009

This topic is archived.

Back to support forum

Forum search