ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

1
Date Submitted Thu. Mar. 19th, 2009 5:19 AM
Revision 1
Scripter mycodeofshailendra
Tags DataGrid | in | Pagination
Comments 0 comments
showing Pagination in DataGrid
10
Date Submitted Thu. Jan. 4th, 2007 4:22 AM
Revision 1
Beginner jimmah
Tags DataGrid | forms | VB.NET | windows
Comments 3 comments
The easiest way to give columns in a DataGrid the look you want is to use a DataGridTableStyle and to add a GridColumnStyle for each column in the grid.
6
Date Submitted Fri. Oct. 13th, 2006 10:01 AM
Revision 1
Beginner nothingHappens
Tags ActionScript | DataGrid | Flash | sorting
Comments 0 comments
I think that the problem comes when you populate a DataGrid's dataProvider with data from a a remoting call, such as a RecordSet returned from AMFPHP. The remoting protocol doesn't remember the datatype of each database column, so once you get the RecordSet back to ActionScript everything has become a String. You could go to the trouble of casting every numeric column's contents in the RecordSet to a Number so that the DataGrid will sort those columns numerically (1, 2, 3, ...) rather than lexicographically (1, 10, 11, ..., 2, 20, ...)... or you could throw this quick little function in and tell it which columns you consider numeric. It will replace the default sorting behavior with one that casts to numbers before comparing, when dealing in the columns you specify. Pass it an array of the columns' indices and the DataGrid in question. Non-numeric strings in the columns you specify will get treated as 0 and left unsorted at the top.