G
Guest
Hi,
I'm following
http://msdn.microsoft.com/library/d...atingwebservercontroltemplatesdynamically.asp
Why did I have to use this in the event handler?
lc.Text += "<td align=\"left\">" +
((System.Data.DataRow)(((System.Data.DataRowView)(((System.Object)(container.DataItem)))).Row)).ItemArray[0].ToString() + "</td>";
I could never get lc.Text to use DataBinder.Eval on the columns.
code:
....
case ListItemType.Item:
lc.Text = "<tr style=\"background-color:#F0F0F0\">";
lc.DataBinding +=new EventHandler(lc_DataBinding);
break;
case ListItemType.AlternatingItem:
lc.Text = "<tr style=\"background-color:#E0E0E0\">";
lc.DataBinding +=new EventHandler(lc_DataBinding);
break;
case ListItemType.Footer:
lc.Text = "</table>";
break;
....
I'm following
http://msdn.microsoft.com/library/d...atingwebservercontroltemplatesdynamically.asp
Why did I have to use this in the event handler?
lc.Text += "<td align=\"left\">" +
((System.Data.DataRow)(((System.Data.DataRowView)(((System.Object)(container.DataItem)))).Row)).ItemArray[0].ToString() + "</td>";
I could never get lc.Text to use DataBinder.Eval on the columns.
code:
....
case ListItemType.Item:
lc.Text = "<tr style=\"background-color:#F0F0F0\">";
lc.DataBinding +=new EventHandler(lc_DataBinding);
break;
case ListItemType.AlternatingItem:
lc.Text = "<tr style=\"background-color:#E0E0E0\">";
lc.DataBinding +=new EventHandler(lc_DataBinding);
break;
case ListItemType.Footer:
lc.Text = "</table>";
break;
....