G
Guest
Hi,
I am having trouble with the datagrid.
I have a label in an ItemTemplate.
I have a simple function in the label which I have tested and works
(the function does pass back a system.drawing.colour)
I do not know the syntax to pass "theID" into this function!
I am trying stuff like
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(Container.DataItem) %>">Some Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(Container.DataItem.theID) %>">Some Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(DataBinder.Eval(Container, "DataItem.theID")) %>">Some
Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(DataItem.theID) %>">Some Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(DataBinder.Eval(Container.DataItem.theID)) %>">Some
Text</asp:Label>
Help please
Charlie
I am having trouble with the datagrid.
I have a label in an ItemTemplate.
I have a simple function in the label which I have tested and works
(the function does pass back a system.drawing.colour)
I do not know the syntax to pass "theID" into this function!
I am trying stuff like
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(Container.DataItem) %>">Some Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(Container.DataItem.theID) %>">Some Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(DataBinder.Eval(Container, "DataItem.theID")) %>">Some
Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(DataItem.theID) %>">Some Text</asp:Label>
and
<asp:Label id="lblName" runat="server" BackColor="<%#
functionName(DataBinder.Eval(Container.DataItem.theID)) %>">Some
Text</asp:Label>
Help please
Charlie