I retrive data from a table to a datagridview.
I want the coulmns to be in a sorted according to their names
ex: column starting with 'a' should come before that of 'b' and so on
Is there any SQL querry for the above problem or any function in datagridview which can be used.
prasu
1
Newbie Poster
Recommended Answers
Jump to PostHi, you can Use
ORDER BY FieldName SQL in Queries. This will sort and Display in sorted order in DataGridView.
SyntaxSELECT fieldlist FROM table WHERE selectcriteria [ORDER BY field1 [ASC | DESC ][, field2 [ASC | DESC ]][, ...]]]
Ex
SELECT LastName, FirstName …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.