Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am making desktop application using c#.Net and Sql Server.

I have taken datagrid view to display the data which is stored in SQL.

I am getting the data displayed.Now i want that the fiels name which are in database should get replaced with another name in data grid view.
(e.g if i am having field name Product_Id in database then in dat grid view it should be like Product ID)
regards
Posted
Updated 4-May-11 22:53pm
v2
Comments
Dalek Dave 5-May-11 4:53am    
Edited for Readability.

1 solution

use alias name for it in SQL you can give alias name to a particular column
select Product_id as 'Product Id' from table

to know more about alias refer to the following link Click Here
 
Share this answer
 
Comments
Ashishmau 5-May-11 4:37am    
Perfect
Dalek Dave 5-May-11 4:53am    
Good Answer.
shivani 2013 5-May-11 5:07am    
thanx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900