473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to set header name of datagridview vb.net

I used the vb.net 2008
I want to set the header name of my datagridview when connect to my database.

here is the problem..
field name of database is "item_code" also show the same in data gridgridview..

I want to change it to be "Item Code" in datagridview, but i don't kow how to code it. When i change it manually the data from database not appear..pls help me solve this..
Jul 30 '12 #1
4 5349
PsychoCoder
465 Expert Mod 256MB
Just go into your database and change that value like so "Item Code";
Jul 30 '12 #2
Mudassir
85 64KB
you can add an item template or Bound Field in the grid view to bind the data, and set the header text of item template or bound field to Item Code
...
Addan
Aug 7 '12 #3
Frinavale
9,735 Expert Mod 8TB
Mudassir, a DataGridView is not the same as a ASP.NET GridView and does not use item templates.

Anyways, the DataGridView has DataGridViewColumns and a DataGridViewColumn has a HeaderText Property that you can use to set the column's headers.

So, loop through the columns in your DataGridView, find the one with the header text that you don't like, and change it :)

-Frinny
Aug 7 '12 #4
Mudassir
85 64KB
Pardon me , i thought it a grid view of asp.net..
Aug 7 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Will | last post by:
Hi all, I need to know how to manually set the header name of a column in a datagrid. Everytime i retieve records from a database, the coloum header of the datagrid defaults to the column...
3
by: DigHazuse | last post by:
relative noob. i'm trying to get/display the column Header name that the user clicks to sort on the DataGrid. I know that i could take the e.SortExpression and spin through the Columns on the...
1
by: Grey | last post by:
How can I get the column header name when user click on the column for sorting purpose?? Million thanks
1
by: EJSawyer | last post by:
In the process of building a SOAP client for a third-party service, I have created a "dummy" service running on my local machine to debug against. I have the dummy service working pretty well, but...
0
by: SyB | last post by:
Hi, Does anyone know where I can find info/example on adding a checkbox into a header cell of a DataGridViewCheckBoxColumn. Cheers, Sy
2
by: neeraj | last post by:
Hi, all Could any one suggest me how to get the column name or column index of the datagrid , when user click on any column header of the grid in vb.net (windows) application ..
3
by: Bill Nguyen | last post by:
I can't figure out how to identify/display the column header name in Mouseclick event. This is a checkbox column type and I would like all cells in this column to toggle checked/unchecked when the...
2
by: sajjeelhassan | last post by:
hi can any one tell i found a problem ...while during work on datagridview checkbox is in the 2nd column of the datagridview having header "REGISTER" and a textbox in the 1st column of the...
1
by: DBC User | last post by:
I would like to create a datagrid view, with columnheader and rowheader, is it possible to do that? I know I can create column header but never seen one example where you can create a row header as...
1
by: =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ== | last post by:
I have written a Web Service that works with my test harness written using VS2005. However, a client to the service consistently receives a "Bad Request (Invalid Header Name)" response for each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.