I'm trying to use a ColorPicker in a DetailView to allow a user to change the assigned color of a matching record. Below is my code:
But when I view the page with loaded data and switch to Edit mode I'm getting the following error on the EditItemTemplate line: System.InvalidCastException: Specified cast is not valid.
Is there another way to bind data to the ColorPicker control?
<asp:TemplateField> |
<HeaderStyle/> |
<HeaderTemplate>AssignedColor:</HeaderTemplate> |
<EditItemTemplate><telerik:radcolorpicker ID="rcpAssignedColor" runat="server" preset="Standard" SelectedColor='<%#Bind("AssignedColor")%>'></telerik:radcolorpicker></EditItemTemplate> |
<ItemTemplate><%#Eval("AssignedColor")%></ItemTemplate> |
</asp:TemplateField> |
But when I view the page with loaded data and switch to Edit mode I'm getting the following error on the EditItemTemplate line: System.InvalidCastException: Specified cast is not valid.
Is there another way to bind data to the ColorPicker control?