473,320 Members | 2,117 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.

Adding runtime columns to designtime datagrid

I've got a datagrid defined on the design page. At runtime, I'd like to add
a bound column. I'm using
Dim CallNum As New BoundColumn()
CallNum.DataField = "call_num"
CallNum.HeaderText = "Call #"
CallNum.Visible = True
grdList.Columns.Add(CallNum)
But, the new column is not showing up at runtime. Is there another step to
this?

Chip
Nov 17 '05 #1
1 1067
Just figured it out. The new column doesn't survive the postback, so it
needs to be added just in time for use.
"Chip" <ch**@intradata.com> wrote in message
news:um**************@TK2MSFTNGP12.phx.gbl...
I've got a datagrid defined on the design page. At runtime, I'd like to add a bound column. I'm using
Dim CallNum As New BoundColumn()
CallNum.DataField = "call_num"
CallNum.HeaderText = "Call #"
CallNum.Visible = True
grdList.Columns.Add(CallNum)
But, the new column is not showing up at runtime. Is there another step to
this?

Chip

Nov 17 '05 #2

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

Similar topics

1
by: The_Rave | last post by:
Hi everyone, I'm trying to add my own template columns to the property builder of ..NET. E.g. a checkbox column, or an image column. But I can't find the sources of the wizard, or a way to add...
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: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
2
by: Steve Pierce | last post by:
I am having some issues with a runtime dropdownlist in a datagrid. The issue is that I cannot get ViewState to fill the selected index of a runtime dropdown properly on postback. I do not want to...
0
by: Michael | last post by:
Hi, I found a wierd problem in DataGrid. If I set DataGrid's DataSource to empDataSet1 at designtime, then I can never change its DataSource at runtime, e.g., in the Button1_Click event...
3
by: Fao, Sean | last post by:
I have a DataGrid that I'm adding CheckBox controls to at runtime (in the code behind) and I'm not sure if I'm doing it correctly. First of all, I noticed that the MyDataGrid.Columns.Add() method...
7
by: Varangian | last post by:
Hello is creating controls at runtime the same as designtime ? will a page be faster if controls are created at designtime rather than at runtime ? If so why ? thanks :)
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...
11
by: Pete Kane | last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would contain tab pages of my own classes, I know you can achieve this with...
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...
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)...
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...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.