Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invert datagrid

Status
Not open for further replies.

NHW

Programmer
Mar 16, 2004
24
0
0
HK
Hi.
Is it possible to invert the built-in datagrid? Eg in the database:
Name | Phone | Gender
Tom | 1234 | M

On screen:
Name | Tom
Phone | 1234
Gender| M

Thanks
 
I am assuming you're using SQL to call the data from the database just add a ORDER BY [fieldName] DESC at the end.

If this is on a button to allow the user to re-order a list just recall the SQL changing the ORDER BY to DESC or ASC and Re-Bind the datagrid.
 
I think I may not have made myself clear. "Name", "Phone", and "Gender" are column names. Since I'm not trying to sort the sequence of my output, the ORDER BY clause probably isn't suitable in this case?
 
See this thread for couple for ideas

thread855-749559



Greetings,
Dragonwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top