473,795 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change the column header in windows form datagrid

How can I change the column header text in windows form datagrid?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 21 '05 #1
3 4440
You can use datagridcolumns tyles for that
http://msdn.microsoft.com/library/de...rtexttopic.asp

I hope this helps?

Cor
How can I change the column header text in windows form datagrid?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 21 '05 #2
Hi,

an other simple solution is to create a column alias in your select
statement:
for example: Select code as Number from table
will set the column header to Number

hth Peter

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:Ot******** *****@tk2msftng p13.phx.gbl...
You can use datagridcolumns tyles for that
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwind owsformsdatagri dcolumnstylecla ssheadertexttop ic.asp
I hope this helps?

Cor
How can I change the column header text in windows form datagrid?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*


Nov 21 '05 #3
Peter,

That was what I did not wanted to write?

:-)

Cor

"Peter Proost" <pp*****@nospam .hotmail.com>
Hi,

an other simple solution is to create a column alias in your select
statement:
for example: Select code as Number from table
will set the column header to Number

hth Peter

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:Ot******** *****@tk2msftng p13.phx.gbl...
You can use datagridcolumns tyles for that

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwind owsformsdatagri dcolumnstylecla ssheadertexttop ic.asp

I hope this helps?

Cor
> How can I change the column header text in windows form datagrid?
>
> *-----------------------*
> Posted at:
> www.GroupSrv.com
> *-----------------------*



Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8908
by: Webgour | last post by:
Hi, I'm tring to add a column to a datagrid with a linkbutton as header that can be used to sort the column. The column and the linkbutton are added programmatically (see below). However the problem is that when you click the added column header it doesn't trigger the sort. The code : <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
0
1707
by: VMI | last post by:
My Windows datagrid has two columns: one with the data that the user will see (col_X) and the other one (a hidden one: col_sort) that'll be used to sort data. When a user clicks on col_X's column header, I'm intercepting the header click and "telling" it to sort the dataview using col_sort. But for some reason, the "return" is not being executed. When I press the mouse key, it'll sort correctly (by col_sort), but as soon as I release the...
5
8801
by: Alex K. | last post by:
How do I define multiline column header in DataGrid control? I need two-line headers for some columns. Thank you
2
2114
by: | last post by:
Hello All, I am having a lot of difficulty trying to bind a templated column, that is programmatically created for a datagrid, to a datasource column. I have a datasource containing 2 columns, ID and VALUE. I would like to create a templated column in the datagrid that is bound to the VALUE column of the datasource.
0
1277
by: Demetri | last post by:
I have a web form with a datagrid. The datagrid has 5 columns. In design mode each column has header text. I defined the header text, data source, etc in property builder (visible is checked in property builder). I have also verified my settings in html mode. Everything looks great. When I run the app one of the headers are not there but the column is there since the data gets rendered. I'm just missing my column header - column number...
4
2040
by: IGotYourDotNet | last post by:
on my web app, i need to display data from a table in a grid. (i know how to do that). The grid will be populated with data depending on what the user selects in a drop down box. My question is instead of having 20 grids can i use only 1 and change the data that should be displayed and the headers via code, or do I need a seperate grid per choice in the drop down box.
7
2766
by: PJ | last post by:
How can you set the background color of individual columns in a datagrid to be different to others? The table styles only allow you to do this at the grid level for all columns.
1
1463
by: Jim | last post by:
Hello, I am creating a windows form application using vb.net 2003 which displays data in a datagrid, and then, if the user wants, I produce a nicely formatted crystal report of the data. The question I have is: if I allow the user to sort the datagrid by clicking on the column header, is there any way that I can tell which column the datagrid is sorted on, so that I can sort the data in the crystal report the same way?
6
2751
by: Agnes | last post by:
I understand it is impossible, but still curious to know "Can I freeze several column in the datagrid, the user can only scroll the first 3 columns (not verical), for the rest of the coulumn, it is freeze.
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.