Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / December 2006



Tip: Looking for answers? Try searching our database.

Datagrid Sorting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
srirama.83 - 20 Dec 2006 06:33 GMT
I have a datagrid which displays the values from the Dataset. The Dataset
values are not sorted alphabetically. So the datagrid initially displays the
values in an unsorted manner. Only when I click on the header of the datagrid
the values are displayed in assorted manner. I want the datagrid to display the
values in alphabetical order when it is loaded with the values. Can this be
done ?
If so anyone please let me know how to do that .
KLee - 21 Dec 2006 13:00 GMT
If you are loading the data into the grid from a database, put an order by in your select with the order you want the grid loaded with.

ie.  Select * from table
    where ...(optional)
    order by column1, column2 etc
   

From http://www.developmentnow.com/g/70_2006_12_0_0_867047/Datagrid-Sorting.ht

Posted via DevelopmentNow.com Group
http://www.developmentnow.com
Scott Johnson - 21 Dec 2006 14:15 GMT
sort the dataset prior to loading it into the datagrid.

Check the help files for dataset.addSort() and dataset.userSort()

Basically you will use the dataset.addSort()

    dataset.addSort(name,field);
    name = name you want to call this sort
    filed = the field you want to sort on.

Then you call the dataset.useSort()

    dataset.useSort(name)
    name = what you called the sort in addSort.

Now your dataset is sorted.

   

> I have a datagrid which displays the values from the Dataset. The Dataset
> values are not sorted alphabetically. So the datagrid initially displays the
[quoted text clipped - 3 lines]
> done ?
>  If so anyone please let me know how to do that .
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.