I use this function. I think it was from this list
function sortGrid(a, b, index) {
var result;
var field;
var field = yourDataGrid.columns[index].columnName;
var i1 = a[field];
var i2 = b[field];
var i1 = Number(a);
var i2 = Number(b);
if (i1 == i2)
result = 0;
else if (i1 < i2)
result = -1;
else
result = 1;
return result;
}
and then put sortCompareFunction="sortGrid" in relevant datagridcolumns
--- In [email protected], "jrab2999" <[EMAIL PROTECTED]> wrote:
>
> Hi again,
>
> I have a datagrid with 3 cols. Col 1 + 2 consists of alphanumerical
> values, col 3 has numerical values. The default sort is alphanumeric.
> How to change the sort of col 3 to a numerical way?
>
> Cannot find anything about it in docs.
>
> Best regards,
>
> Jurek
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/