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

Datagrid - Adding columns programmatically

Hi,

I need to add columns programmatically to a datagrid I have on my ASP page.
I have approx 6 bound columns and I would like to add a few columns
dynamically. Basically they are calculated values (i.e. (value/No days) *
days in month).

Any help on this would be much appreciated as I seem to be going round in
circles.

Thanks,
J

Nov 19 '05 #1
2 1321
Take a look at TemplateColumns

"JenC" <Je**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Hi,

I need to add columns programmatically to a datagrid I have on my ASP page. I have approx 6 bound columns and I would like to add a few columns
dynamically. Basically they are calculated values (i.e. (value/No days) *
days in month).

Any help on this would be much appreciated as I seem to be going round in
circles.

Thanks,
J

Nov 19 '05 #2
Check out this article to know how to dynamically add template columns in
datagrid.
http://www.dotnetbips.com/displayarticle.aspx?id=84
http://www.dotnetbips.com/displayarticle.aspx?id=85

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"JenC" <Je**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Hi,

I need to add columns programmatically to a datagrid I have on my ASP page. I have approx 6 bound columns and I would like to add a few columns
dynamically. Basically they are calculated values (i.e. (value/No days) *
days in month).

Any help on this would be much appreciated as I seem to be going round in
circles.

Thanks,
J

Nov 19 '05 #3

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

Similar topics

2
by: John Latten | last post by:
Hi there, I have got a problem when adding extra (= dummy) columns to a datagrid. I have a datagrid that is bound to a datatable. The datatable is filled with data from a SQL Server 2000...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Mikkel Olsen | last post by:
Hi. I have a problem regarding to the DataGrid_ItemDataBound event. I cant run this event when my datagrid is inside a DataList. The ItemDataBound for DataList1 is working well, but it never...
3
by: Allen K | last post by:
Hi, I'm programmatically creating a HyperLink column for my datagrd ( in addition to Bound Columns created through the VS.NET Visual Interface ). However, when a Postback occurs, this column...
1
by: Steve Black | last post by:
Hello, I am trying to add an EditCommand Button to a datagrid. If I programmatically add the button, like this: Dim eb As EditCommandColumn eb = New EditCommandColumn With eb .ButtonType...
0
by: Chris | last post by:
Ok, I think this is an easy one - I've just been staring at it too long. I'm creating a datagrid in asp.net/c# from scratch, i.e. nothing at all in the aspx page. I'm also creating all the...
7
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The...
4
by: gane | last post by:
Hi, I am creating datagrid bound column dynamically and need to check if a datagrid column already exists?Is there a way to check this? thanks gane
1
by: herman404 | last post by:
Hi everyone, I have a datagrid with a column template with one editbox. Is it possible to add columns dynamically to this datagrid based on the result set that comes back from a database query? I...
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
1
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: 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.