473,405 Members | 2,354 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,405 software developers and data experts.

How do i: Change the header text in a datagrid that is databound?

Hi,

I have tried aliasing columns in the SELECT statement - they get ignored.
I have tried accessing the .columns(0).headertext - but as the grid is
databound that column collection does not exist.

Any help appreciated. Thanks.
Nov 19 '05 #1
2 976
The only way is to handle ItemCreated event. Then you can catch headers as
they get created and change the text.

Eliyahu

"John Blair" <jo********@hotmail.com> wrote in message
news:_U***************@newsfe5-gui.ntli.net...
Hi,

I have tried aliasing columns in the SELECT statement - they get ignored.
I have tried accessing the .columns(0).headertext - but as the grid is
databound that column collection does not exist.

Any help appreciated. Thanks.

Nov 19 '05 #2
Thanks again!

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:Ou****************@TK2MSFTNGP09.phx.gbl...
The only way is to handle ItemCreated event. Then you can catch headers as
they get created and change the text.

Eliyahu

"John Blair" <jo********@hotmail.com> wrote in message
news:_U***************@newsfe5-gui.ntli.net...
Hi,

I have tried aliasing columns in the SELECT statement - they get ignored.
I have tried accessing the .columns(0).headertext - but as the grid is
databound that column collection does not exist.

Any help appreciated. Thanks.


Nov 19 '05 #3

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

Similar topics

1
by: Stephen | last post by:
Was wondering if it is possible to take the contents of a row in a datagrid and use an event to copy over the details of the selected row into another datagrid. I'd like to be able to do the...
3
by: Ben R. | last post by:
I've got a repeater that's bound to a datareader and I'd like to conditionally modify the text that is being outputted. Previously, I've done this by assigning a name to attribute to the...
1
by: Patrick Demets | last post by:
I have a fairly simple form with databound text boxes, but changes (or new records) are not recognized. The text boxes are successfully populated with data (from the database) and I can cycle...
0
by: Stephen | last post by:
I was wondering if it is possible to take the contents of a row in a datagrid and use an event to copy over the details of the selected row into another datagrid. I'd like to be able to do the...
4
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...
3
by: Franck | last post by:
hello, I'm trying to add a tooltip at the datagrid header but I don't know where to start? I tought about a template column but i only wish to have the tooltip on the header? any help?...
1
by: Øyvind Isaksen | last post by:
Hi friends! I have a Datagrid with AutoGenerateColumns = True. How can I rename the headertext without using ASP:BoundColumn? I dont want to show the database names, but make my own header...
1
by: Ben | last post by:
Hi there, I would like to change the text of the ButtonColumn after datagrid binding, depending on the value of a certain field. (eg. Text="Details" for case 1, Text="others' for case 2) Is...
3
by: tshad | last post by:
How do I change the color of a particular columns' text (forecolor)? I normally do this in my PreRender function for the rows as: for each oItem as DataGridItem in DataGrid1.Items oLabel =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.