Connecting Tech Pros Worldwide Forums | Help | Site Map

Datagrid view problem

Member
 
Join Date: May 2007
Posts: 121
#1: Sep 1 '07
I have datagrid in my project is used to view the result from the back end i.e from tables.Here datagrd column names fromtable fields.can i alter the column nams
i used the code
set datagrid1.datasource=rs
for ed
if i have field name empname
the datagrid column header of column 0 is empname
i want to rename the column header as Employee Name

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,511
#2: Sep 1 '07

re: Datagrid view problem


You can easily achieve the same by using the COLUMN ALIAS of the databse table fields.

sample
----------------
Expand|Select|Wrap|Line Numbers
  1. select ename as employeename,sal as salary from emp;
Reply


Similar Visual Basic 4 / 5 / 6 bytes