Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Adding runtime columns to designtime datagrid

Reply
Thread Tools

Adding runtime columns to designtime datagrid

 
 
Chip
Guest
Posts: n/a
 
      11-10-2003
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


 
Reply With Quote
 
 
 
 
Chip
Guest
Posts: n/a
 
      11-10-2003
Just figured it out. The new column doesn't survive the postback, so it
needs to be added just in time for use.


"Chip" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retrieve the columns list of an ObjectDataSource at designtime Grupo ESI - Cotarelo ASP .Net 0 09-29-2008 01:07 AM
Creating controls at runtime or designtime Varangian ASP .Net 7 04-27-2006 07:33 AM
Segregating designtime from runtime General Chaud Caliente ASP .Net Building Controls 8 10-24-2003 10:05 PM
Designtime error when accessing DataGrid Columns collection Edward J. Stembler ASP .Net Web Controls 0 10-17-2003 02:25 PM
Adding Columns at runtime in datagrid control Naveed Alam ASP .Net Datagrid Control 0 09-05-2003 08:23 AM



Advertisments