System.Web.UI.WebControls.Table

  • Thread starter Thread starter martin
  • Start date Start date
M

martin

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.
 
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.
 
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
 
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.
 
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.
 
Back
Top