Issue 1:
I'm trying to add a radcolorpicker to a grid such that when inserting or updating a row, the color picker will display and it's selected value will show in the "Color" column field.
Using a templates i've added it to the edit column, but it doesn't do anything, can't even select colors, and when compiled and ran I get a javascript error: "Sys" is undefined.
I'm sure I have the basic idea of how to use it wrong. Of course. :)
I have a scriptmanager in place, although I'm not going to speculate on what that does. :)
Any ideas on what I'm missing, or doing wrong?
Issue 2:
protected void RadColorPicker1_ColorChanged(object sender, EventArgs e) |
{ |
Label1.Text = ColorTranslator.ToHtml(RadColorPicker1.SelectedColor); |
} |
When compiling this gives me a compile time Error --
"The name 'RadColorPicker1' does not exist in the current context ..."
How do I ensure it's context?
Al
<radG:RadGrid |
ID="RadGrid2" runat="server" |
Height="100px" |
Width="500px" |
Title="Rules" |
BorderStyle="Solid" |
BorderWidth="1px" |
DataSourceID="ObjectDataSource1" |
GridLines="None" |
AllowAutomaticInserts="True" |
AllowAutomaticUpdates="True" |
AutoGenerateColumns="False" |
MasterTableView-AllowPaging="true" |
OnDeleteCommand="RadGrid2_DeleteCommand" |
OnPreRender="RadGrid2_PreRender" |
OnItemEvent="RadGrid2_ItemEvent" |
OnItemInserted="RadGrid2_ItemInserted" |
OnItemUpdated="RadGrid2_ItemUpdated" |
OnCancelCommand="RadGrid2_CancelCommand" |
OnDataBound="RadGrid2_DataBound" > |
<MasterTableView |
DataKeyNames="idExceptionRule" |
DataSourceID="ObjectDataSource1" |
AllowPaging="True" > |
<ExpandCollapseColumn Visible="False"> |
<HeaderStyle Width="19px" /> |
</ExpandCollapseColumn> |
<RowIndicatorColumn Visible="False"> |
<HeaderStyle Width="20px" /> |
</RowIndicatorColumn> |
<Columns> |
<radG:GridBoundColumn DataField="decMin" HeaderText="From" UniqueName="From"> |
</radG:GridBoundColumn> |
<radG:GridBoundColumn DataField="decMax" HeaderText="To" UniqueName="To"> |
</radG:GridBoundColumn> |
<radG:GridBoundColumn DataField="hexColourFont" HeaderText="Color" UniqueName="Color"> |
<ItemStyle BackColor="White" BorderColor="#404040" BorderStyle="Solid" BorderWidth="1px" |
HorizontalAlign="Left" VerticalAlign="Middle" /> |
</radG:GridBoundColumn> |
<radG:GridTemplateColumn DataField="hexColourFont" ShowSortIcon="False" UniqueName="TemplateColumn"> |
<EditItemTemplate> |
<telerik:RadColorPicker ID="RadColorPicker1" runat="server" Preset="Web216" |
ShowIcon="True" OnDataBinding="RadColorPicker1_ColorChanged" AutoPostBack="True" OnColorChanged="RadColorPicker1_ColorChanged"> |
</telerik:RadColorPicker> |
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> |
</EditItemTemplate> |
</radG:GridTemplateColumn> |
<radG:GridEditCommandColumn> |
</radG:GridEditCommandColumn> |
<radg:GridButtonColumn CommandName="Delete" Text="Delete" |
UniqueName= "DeleteColumn" ButtonType="ImageButton" ImageUrl=".\delete.gif" /> |
</Columns> |
<EditFormSettings> |
<EditColumn UniqueName="EditCommandColumn1"> |
</EditColumn> |
</EditFormSettings> |
</MasterTableView> |
<ValidationSettings CommandsToValidate="PerformInsert,Update,Delete" /> |
</radG:RadGrid> |