By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,289 Members | 3,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,289 IT Pros & Developers. It's quick & easy.

System.Web.UI.WebControls.Table

P: n/a
Hi,

I am using vb.net and visual studio 2003.
I have dragged a table webcontrol onto the designer server and configured a
few columns and cells in the editor for the table control.

Next I wanted to do things like add textbox websever controls to the
individual cells. However, the designer will not allow me to drag controls
from the toolbox to tinside the newly generated table.

I can create new controls at another point on the aspx page and then "copy
and paste" then into the table web control cells, but I am thinking if the
designer does not let me add them to the table straight off then perhaps
this is not the why to do it.

so my question is.

how do I add controls to a table web server control, is my only choice to do
it programatically

any help is appreciated.

cheers

martin.
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Why not just use a datagrid, you can do this easily in templated columns.

"martin" <St**************@yahoo.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hi,

I am using vb.net and visual studio 2003.
I have dragged a table webcontrol onto the designer server and configured a few columns and cells in the editor for the table control.

Next I wanted to do things like add textbox websever controls to the
individual cells. However, the designer will not allow me to drag controls
from the toolbox to tinside the newly generated table.

I can create new controls at another point on the aspx page and then "copy
and paste" then into the table web control cells, but I am thinking if the
designer does not let me add them to the table straight off then perhaps
this is not the why to do it.

so my question is.

how do I add controls to a table web server control, is my only choice to do it programatically

any help is appreciated.

cheers

martin.

Nov 18 '05 #2

P: n/a
Ok,

cheers for that, I never though of using a datagrid cause none of my data is
bound from a datasource.
I will look at this method.

cheers

martin.

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Why not just use a datagrid, you can do this easily in templated columns.

"martin" <St**************@yahoo.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hi,

I am using vb.net and visual studio 2003.
I have dragged a table webcontrol onto the designer server and configured
a
few columns and cells in the editor for the table control.

Next I wanted to do things like add textbox websever controls to the
individual cells. However, the designer will not allow me to drag
controls from the toolbox to tinside the newly generated table.

I can create new controls at another point on the aspx page and then "copy and paste" then into the table web control cells, but I am thinking if the designer does not let me add them to the table straight off then perhaps
this is not the why to do it.

so my question is.

how do I add controls to a table web server control, is my only choice

to do
it programatically

any help is appreciated.

cheers

martin.


Nov 18 '05 #3

P: n/a
Your original idea of using a table is better. Why to use datagrid if all
you need is to layout the other controls properly? If it is the case, I
suggest you to make another step towards simplicity and to replace the table
webcontrol with a table HTML control. You can put webcontrols in the HTML
table cells, and the designer will let you do it without any problems. BTW,
you don't have to use designer view in the first place. You can populate
your form in HTML view in much more flexible way.

Eliyahu

"martin" <St**************@yahoo.com> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Ok,

cheers for that, I never though of using a datagrid cause none of my data is bound from a datasource.
I will look at this method.

cheers

martin.

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Why not just use a datagrid, you can do this easily in templated columns.

"martin" <St**************@yahoo.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hi,

I am using vb.net and visual studio 2003.
I have dragged a table webcontrol onto the designer server and

configured
a
few columns and cells in the editor for the table control.

Next I wanted to do things like add textbox websever controls to the
individual cells. However, the designer will not allow me to drag

controls from the toolbox to tinside the newly generated table.

I can create new controls at another point on the aspx page and then "copy and paste" then into the table web control cells, but I am thinking if the designer does not let me add them to the table straight off then perhaps this is not the why to do it.

so my question is.

how do I add controls to a table web server control, is my only choice

to
do
it programatically

any help is appreciated.

cheers

martin.



Nov 18 '05 #4

P: n/a
It's just a glitch in the Designer. It's fine to add your Controls in the
way you have been (copying and pasting).

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"martin" <St**************@yahoo.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hi,

I am using vb.net and visual studio 2003.
I have dragged a table webcontrol onto the designer server and configured a few columns and cells in the editor for the table control.

Next I wanted to do things like add textbox websever controls to the
individual cells. However, the designer will not allow me to drag controls
from the toolbox to tinside the newly generated table.

I can create new controls at another point on the aspx page and then "copy
and paste" then into the table web control cells, but I am thinking if the
designer does not let me add them to the table straight off then perhaps
this is not the why to do it.

so my question is.

how do I add controls to a table web server control, is my only choice to do it programatically

any help is appreciated.

cheers

martin.

Nov 18 '05 #5

P: n/a
cheers for that Eliyahu

the reason I want to use a webcontrol table instead of a straight HTML table
is so that I can access the individual cells of the table from my code
behind page.
basically I want to change the css class of the individual cells depending
on whether a link in a cell is clicked or not.

I am not sure that I can access individual cells of a html table from a code
behind page.

cheers

martin.


"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Your original idea of using a table is better. Why to use datagrid if all
you need is to layout the other controls properly? If it is the case, I
suggest you to make another step towards simplicity and to replace the table webcontrol with a table HTML control. You can put webcontrols in the HTML
table cells, and the designer will let you do it without any problems. BTW, you don't have to use designer view in the first place. You can populate
your form in HTML view in much more flexible way.

Eliyahu

"martin" <St**************@yahoo.com> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Ok,

cheers for that, I never though of using a datagrid cause none of my data
is
bound from a datasource.
I will look at this method.

cheers

martin.

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Why not just use a datagrid, you can do this easily in templated columns.
"martin" <St**************@yahoo.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
> Hi,
>
> I am using vb.net and visual studio 2003.
> I have dragged a table webcontrol onto the designer server and

configured
a
> few columns and cells in the editor for the table control.
>
> Next I wanted to do things like add textbox websever controls to the
> individual cells. However, the designer will not allow me to drag

controls
> from the toolbox to tinside the newly generated table.
>
> I can create new controls at another point on the aspx page and then

"copy
> and paste" then into the table web control cells, but I am thinking
if the
> designer does not let me add them to the table straight off then perhaps > this is not the why to do it.
>
> so my question is.
>
> how do I add controls to a table web server control, is my only

choice to
do
> it programatically
>
> any help is appreciated.
>
> cheers
>
> martin.
>
>



Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more ASP.NET Questions on Bytes