473,320 Members | 1,883 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,320 software developers and data experts.

Datagrid colums name ??

Dear all,

I have a datagrid erver control which is bind to a dataset.
How to display as column name custom text instead of database fields name ?

Ex :
Started At instead of START_TIME_COL

thnaks
regards
serge
Jan 20 '06 #1
3 1026
You can go into the DataGrid's Property Builder (right-click on
DataGrid -> Property Builder) and accomplish this. Under the Columns
section, uncheck "Create columns automatically at run time" and then
add each Bound Column, if they are not already there. Under each Bound
Column's properties, you can change the HeaderText property to whatever
you want. Just make sure to leave the DataField property to the field
name in the database.

Jan 20 '06 #2
Thanks for your reply
I need to bind datset to datagrid dynamically , so grid column name as well,
so I do not want to you the propertie builder from the IDE.
I rather prefer to code it

If I do that, is there a particular event that I can play with which occurs
just before the grid gets dispay and allows me to change column text and
datbound filed ?

thnaks

"jo********@gmail.com" wrote:
You can go into the DataGrid's Property Builder (right-click on
DataGrid -> Property Builder) and accomplish this. Under the Columns
section, uncheck "Create columns automatically at run time" and then
add each Bound Column, if they are not already there. Under each Bound
Column's properties, you can change the HeaderText property to whatever
you want. Just make sure to leave the DataField property to the field
name in the database.

Jan 20 '06 #3
I don't blame you on not wanting to use the IDE, I prefer not to as
well.

It might be easier to come up with a solution if I knew a little bit
more about what the application is doing, for instance, when you are
collecting the data that determines the column names. One suggestion
would be to use a DataTable instead of a DataSet. Is there a fixed
number of columns and how are you determining what the columns are to
be named? The DataSet does have the following property that maybe you
could use:

oDataSet.Tables(0).Columns(0).ColumnName

You could traverse through the DataSet and change the ColumnName based
on the index, before you bind it to the DataGrid.

Jan 24 '06 #4

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

Similar topics

1
by: Mats | last post by:
Hi I am working on a webapplication using Asp.net with C#. I have Datagrid that have 3 colums two of them are text but the last one is a CheckBoxList. I have manage to set data to the...
3
by: Marty | last post by:
Hi, How do I set rows/colums, titles and data in the DataGrid control of VB.NET. I don't want to pass through a dataset and use databinding. I want to set this grid manually. Is there any...
5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
0
by: Alper AKCAYOZ | last post by:
Hello, I am developping an application which receives some double-type values from two different socket by two threads. Thread_A receives from Socket_A and Thread_B receives from Socket_B in...
1
by: DarkWing | last post by:
Hello Every one i had a question i am setting up an DataGrid with use of MS SQL server in my sqlserver i have 2 tables 1-UserList(which containes Employee's Name)(has 13 elements,eg 13...
11
by: Fred Nelson | last post by:
I have an application in which it would be VERY beneficial if I could obtain the names of the colums in a datagrid. For example dim datagrid1 as new datagrid datagrid1.datasource = (stored...
4
by: chreo | last post by:
I assume that it is not hard problem. I would like user to only click in datagrid to select whole row - DONE I would like user to select whole row using UP and DOWN arrows. - DONE. And I would...
10
by: Nick | last post by:
Hello, Please pardon my ignorance as I'm sure this is easy to do. I have a datagrid where I want to let the user delete columns. I added a context menu to the datagrid that has a delete option....
4
by: cooltech77 | last post by:
Hi, I am trying to build the following functionality in the datagrid. I have a lot of columns in the datagrid which are being populated from the database and the user needs to scroll...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.