Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Aug 21, 1997

Sorting Data Within a Datagrid

Data is sorted by using the "ORDER BY" clause in a SQL statement and then assigning the SQL statement to the RecordSource property of the data control that the DataGrid is bound to. This code displays the Author table in the DataGrid and sorts it by the LastName field:
 Sub Form1_Load() 
Data1.RecordSource = "Select * from Authors _ 
Order By LastName" 
Data1.Refresh 
End Sub 
Sheridan Software
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date