TableCell

Discussion in 'ASP .Net' started by Serdar Kalaycý, Jun 30, 2003.

  1. I create a TableCell by

    TableCell cell = new TableCell()

    but I could not find how to add a TextBox inside this cell. Any ideas?

    Thanks in advance
    Serdar KALAYCI
    --
    Serdar Kalaycý, Jun 30, 2003
    #1
    1. Advertising

  2. Serdar Kalaycý

    Karl Seguin Guest

    WebControls.TextBox txt = new WebControls.TextBox();
    cell.Controls.Add(txt);

    Karl


    "Serdar Kalaycý" <> wrote in message
    news:ewP%...
    > I create a TableCell by
    >
    > TableCell cell = new TableCell()
    >
    > but I could not find how to add a TextBox inside this cell. Any ideas?
    >
    > Thanks in advance
    > Serdar KALAYCI
    > --
    >
    >
    >
    Karl Seguin, Jun 30, 2003
    #2
    1. Advertising

  3. Got it, here's the code if anyone wonders...

    TableCell cell = new TableCell();
    TextBox text1 = new TextBox();
    cell.Controls.Add (text1);


    "Serdar Kalaycý" <> wrote in message
    news:ewP#...
    > I create a TableCell by
    >
    > TableCell cell = new TableCell()
    >
    > but I could not find how to add a TextBox inside this cell. Any ideas?
    >
    > Thanks in advance
    > Serdar KALAYCI
    > --
    >
    >
    >
    Serdar Kalaycý, Jun 30, 2003
    #3
  4. I have one more question. I added a Button inside a Table at design time by
    changing HTML codes, but I can't access it's events or even see it in the
    components list on the Properties window.

    Serdar KALAYCI


    "Karl Seguin" <kseguin##crea.ca> wrote in message
    news:...
    > WebControls.TextBox txt = new WebControls.TextBox();
    > cell.Controls.Add(txt);
    >
    > Karl
    >
    >
    > "Serdar Kalaycý" <> wrote in message
    > news:ewP%...
    > > I create a TableCell by
    > >
    > > TableCell cell = new TableCell()
    > >
    > > but I could not find how to add a TextBox inside this cell. Any ideas?
    > >
    > > Thanks in advance
    > > Serdar KALAYCI
    > > --
    > >
    > >
    > >

    >
    >
    Serdar Kalaycý, Jun 30, 2003
    #4
  5. Serdar Kalaycý

    Karl Seguin Guest

    if you are adding an object programatically, like your butotn, you'll also
    have to attach the event programatically.

    in vb.net, you can use:
    addhandler yourButton.click, AddressOf yourFunctionHandler

    in c#, you can use:
    yourButton.Click += new EventHandler(yourFunctionHandler);


    Make sure that your button is created, and you attach your handler on
    postback also (ie, don't wrap it in an !page.IsPostback)

    Karl

    "Serdar Kalaycý" <> wrote in message
    news:...
    > I have one more question. I added a Button inside a Table at design time

    by
    > changing HTML codes, but I can't access it's events or even see it in the
    > components list on the Properties window.
    >
    > Serdar KALAYCI
    >
    >
    > "Karl Seguin" <kseguin##crea.ca> wrote in message
    > news:...
    > > WebControls.TextBox txt = new WebControls.TextBox();
    > > cell.Controls.Add(txt);
    > >
    > > Karl
    > >
    > >
    > > "Serdar Kalaycý" <> wrote in message
    > > news:ewP%...
    > > > I create a TableCell by
    > > >
    > > > TableCell cell = new TableCell()
    > > >
    > > > but I could not find how to add a TextBox inside this cell. Any ideas?
    > > >
    > > > Thanks in advance
    > > > Serdar KALAYCI
    > > > --
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Karl Seguin, Jun 30, 2003
    #5
    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. Mr. x

    capture a tablecell event

    Mr. x, Sep 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,120
    Mr. x
    Sep 2, 2003
  2. May
    Replies:
    0
    Views:
    371
  3. Jurjen de Groot

    Inserting text into TableCell at runtime

    Jurjen de Groot, Aug 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    479
    Xavier MT
    Aug 18, 2003
  4. George Durzi

    TableRow/TableCell Serverside Q

    George Durzi, Nov 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    713
    Nicole Calinoiu
    Nov 5, 2003
  5. Brian K. Williams

    TableCell oTableCell = new TableCell(); noWrap?

    Brian K. Williams, Apr 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,504
    Brian K. Williams
    Apr 30, 2004
Loading...

Share This Page