Setting BackColor of pannel
-
Hi , ive got a asp.net vb web app, now i save a color code the a sql database and the show the data in a c1webgrid, now what i want to do is put a panel in template column and set the backcolor of the panel acording to what is in the database Now what i did was C1WebGrid:C1TemplateColumn <ItemTemplate> <asp:Panel ID="Panel4" runat="server" BackColor='<%# Eval("ColorCode") %>' Height="20px" Width="20px> asp:Panel </ItemTemplate> </C1WebGrid:C1TemplateColumn> but it gives me a System.InvalidCastException: Specified cast is not valid error if someone can please help me with this, Thanks
-
Hi , ive got a asp.net vb web app, now i save a color code the a sql database and the show the data in a c1webgrid, now what i want to do is put a panel in template column and set the backcolor of the panel acording to what is in the database Now what i did was C1WebGrid:C1TemplateColumn <ItemTemplate> <asp:Panel ID="Panel4" runat="server" BackColor='<%# Eval("ColorCode") %>' Height="20px" Width="20px> asp:Panel </ItemTemplate> </C1WebGrid:C1TemplateColumn> but it gives me a System.InvalidCastException: Specified cast is not valid error if someone can please help me with this, Thanks
Try Eval("ColorCode").ToString()?
-
Try Eval("ColorCode").ToString()?