System.Web.UI.WebControls.Table

Discussion in 'ASP .Net' started by martin, May 12, 2004.

  1. martin

    martin Guest

    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.
     
    martin, May 12, 2004
    #1
    1. Advertising

  2. martin

    Rick Spiewak Guest

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

    "martin" <> wrote in message
    news:...
    > 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.
    >
    >
     
    Rick Spiewak, May 12, 2004
    #2
    1. Advertising

  3. martin

    martin Guest

    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" <> wrote in message
    news:...
    > Why not just use a datagrid, you can do this easily in templated columns.
    >
    > "martin" <> wrote in message
    > news:...
    > > 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.
    > >
    > >

    >
    >
     
    martin, May 12, 2004
    #3
  4. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > Why not just use a datagrid, you can do this easily in templated

    columns.
    > >
    > > "martin" <> wrote in message
    > > news:...
    > > > 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.
    > > >
    > > >

    > >
    > >

    >
    >
     
    Eliyahu Goldin, May 12, 2004
    #4
  5. 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" <> wrote in message
    news:...
    > 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.
    >
    >
     
    Kevin Spencer, May 12, 2004
    #5
  6. martin

    martin Guest

    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" <> wrote in message
    news:%233tf8T$...
    > 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" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > > news:...
    > > > Why not just use a datagrid, you can do this easily in templated

    > columns.
    > > >
    > > > "martin" <> wrote in message
    > > > news:...
    > > > > 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.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    martin, May 12, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    882
    Matt Getting
    Jul 24, 2003
  2. =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=

    Caching (?) problem with System.Web.UI.WebControls.Table ???

    =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=, Apr 12, 2006, in forum: ASP .Net
    Replies:
    10
    Views:
    1,613
    =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=
    Apr 12, 2006
  3. byrd48
    Replies:
    0
    Views:
    3,597
    byrd48
    Jul 6, 2006
  4. Chris
    Replies:
    1
    Views:
    1,031
    Teemu Keiski
    Feb 12, 2007
  5. Andy B
    Replies:
    2
    Views:
    3,259
    Andy B
    Apr 23, 2008
Loading...

Share This Page