dynamically change table with early binding?

Discussion in 'ASP .Net' started by Max, Jan 3, 2004.

  1. Max

    Max Guest

    For some reason Style is read-only, so this wont work? I was hoping I could
    change the style:

    <asp:TableCell style="background-image:url(images/header_bottombg.gif)"
    Wrap="false" HorizontalAlign="Left" ID="tcMenu1">

    tblMenuRow.Cells.Item(1).Style =
    "background-image:url(images/header_bottombg.gif)"

    Anyway to do this?

    -Max
    Max, Jan 3, 2004
    #1
    1. Advertising

  2. Max

    Natty Gur Guest

    Hi,

    the collection of styles is read only but you can change style
    collection items :

    private void DataGrid1_ItemCreated(object sender,
    System.Web.UI.WebControls.DataGridItemEventArgs e)
    {
    e.Item.Cells[1].Style["background-image"] = "url(1.jpg)";
    }

    Natty Gur[MVP]

    blog : http://weblogs.asp.net/ngur
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Jan 4, 2004
    #2
    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. Shawn
    Replies:
    0
    Views:
    441
    Shawn
    Dec 8, 2003
  2. =?Utf-8?B?UGxhdA==?=
    Replies:
    5
    Views:
    1,894
    =?Utf-8?B?UGxhdA==?=
    Mar 16, 2005
  3. shaun.86

    early vs late binding

    shaun.86, Dec 19, 2005, in forum: Java
    Replies:
    2
    Views:
    16,474
  4. Stu
    Replies:
    1
    Views:
    582
    Arne Adams
    Dec 18, 2004
  5. Replies:
    2
    Views:
    845
    Kevin Grover
    Oct 20, 2006
Loading...

Share This Page