dynamically change table with early binding?

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

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