Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > System.Web.UI.WebControls.Table

Reply
Thread Tools

System.Web.UI.WebControls.Table

 
 
martin
Guest
Posts: n/a
 
      05-12-2004
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.


 
Reply With Quote
 
 
 
 
Rick Spiewak
Guest
Posts: n/a
 
      05-12-2004
Why not just use a datagrid, you can do this easily in templated columns.

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



 
Reply With Quote
 
 
 
 
martin
Guest
Posts: n/a
 
      05-12-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Why not just use a datagrid, you can do this easily in templated columns.
>
> "martin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >
> >

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-12-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Why not just use a datagrid, you can do this easily in templated

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

> >
> >

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      05-12-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
martin
Guest
Posts: n/a
 
      05-12-2004
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" <(E-Mail Removed)> wrote in message
news:%233tf8T$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Why not just use a datagrid, you can do this easily in templated

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

> >
> >

>
>



 
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




Advertisments