| /// <summary> |
| /// Occurs when a timeslot is created. |
| /// Sets the AppointmentType image, as well as the AppointmentState category color. |
| /// </summary> |
| /// <param name="sender">telerik:RadScheduler</param> |
| /// <param name="e">telerik:TimeSlot</param> |
| /// <returns>null</returns> |
| function TimeSlotCreated(sender, e) { |
| var app = e.get_appointment(); |
| var element = e.get_appointment().get_element(); |
| var attributeCollection = app.get_attributes(); |
| var StateIconName = attributeCollection.getAttribute("StateIconName"); |
| var SubStateIconName = attributeCollection.getAttribute("SubStateIconName"); |
| var RsCategory = RgbStringToRadStyleString(attributeCollection.getAttribute("Color")); |
| var customerName = attributeCollection.getAttribute("CustomerName"); |
| var startTime = app.get_start().format("MMM dd, yyyy HH:mm:ss"); |
| attributeCollection.setAttribute("OriginalStartTime", startTime); |
| // Set the tooltip of the appointment |
| if (customerName == null) { customerName = "Geen klant"; } |
| app.set_toolTip("Afspraak: " + app.get_toolTip() + "\n" + "Klant: " + customerName); |
| // Set the stateimage |
| var image = document.createElement("img"); |
| image.setAttribute("src", '/Images/16x16/icons/' + StateIconName); |
| image.setAttribute("alt", 'IconImage'); |
| image.setAttribute("ondragstart", 'javascript:return false;'); |
| // If the appointment has a substate then show the substateimage |
| if (SubStateIconName != null) { |
| var image2 = document.createElement("img"); |
| image2.setAttribute("src", '/Images/16x16/icons/' + SubStateIconName); |
| image2.setAttribute("alt", 'IconImage'); |
| image2.setAttribute("ondragstart", 'javascript:return false;'); |
| } |
| // Add the color style to the appointment |
| element.setAttribute("class", element.className + " rsCategory" + RsCategory); |
| // All appointments with ID 0 are script generated, they are not actually appointments within the database, thus must not be allowed to |
| // be edited/moved or resized in any way shape or form. |
| if (app.get_id() == 0) { |
| app.set_allowDelete(false); |
| app.set_allowEdit(false); |
| } |
| var divs = element.getElementsByTagName('div'); |
| var result; |
| var innerHTML; |
| for (i = 0; i < divs.length; i++) { |
| // IE and its eternal spacing issues *sigh* |
| if ($telerik.$(divs[i]).is("div.rsAptContent")) { |
| result = divs[i]; |
| innerHTML = result.innerHTML; |
| result.innerHTML = ''; |
| result.appendChild(image); |
| // If the appointment has a substate then show the substateimage |
| if (SubStateIconName != null) { result.appendChild(image2); } |
| result.innerHTML = result.innerHTML + innerHTML; |
| result.innerHTML = result.innerHTML + "<br />"; |
| if (customerName != "Geen klant") { |
| result.innerHTML = result.innerHTML + customerName; |
| } |
| return; |
| } |
| } |
| } |
| /// <summary> |
| /// Returns the selected Css style type name for use within tsAptIn etc. |
| /// </summary> |
| /// <param name="color">hex color</param> |
| /// <returns>Named string as used by telerik rsCategory</returns> |
| function RgbStringToRadStyleString(color) { |
| switch (color) { |
| case "#BBD0EC": color = "Blue"; break; |
| case "#202B3F": color = "DarkBlue"; break; |
| case "#2B3F20": color = "DarkGreen"; break; |
| case "#3F2020": color = "DarkRed"; break; |
| case "#D0ECBB": color = "Green"; break; |
| case "#EDD5B7": color = "Orange"; break; |
| case "#F1DCFF": color = "Pink"; break; |
| case "#ECBBBB": color = "Red"; break; |
| case "#FFFBC7": color = "Yellow"; break; |
| case "#540042": color = "Violet"; break; |
| default: color = "Blue"; break; |
| } |
| return color; |
| } |
<
telerik:RadTreeView ID="EntityListView" runat="server" CheckBoxes="true" EnableTheming="false"
Skin="Vista">
<NodeTemplate>
<asp:TextBox ID="tb" runat="server" Width="200px"></asp:TextBox>
</NodeTemplate>
<Nodes>
<telerik:RadTreeNode Text="Software" Expanded="true">
<Nodes>
<telerik:RadTreeNode Text="Business &amp; Office" />
<telerik:RadTreeNode Text="Database" />
<telerik:RadTreeNode Text="Networking" />
<telerik:RadTreeNode Text="Presentation" />
<telerik:RadTreeNode Text="Project Management" />
<telerik:RadTreeNode Text="Reports" />
<telerik:RadTreeNode Text="Spreadsheet" />
<telerik:RadTreeNode Text="Word Processing" />
</Nodes>
</telerik:RadTreeNode>
</Nodes>
<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation>
<ExpandAnimation Duration="100"></ExpandAnimation>
</telerik:RadTreeView>
I have a UserControl with RadAjaxPanel, two asp:panels and some RadControls like RadTextBox, RadComboBox etc. and two buttons (back and continue). I use a skinfile.skin to set all the RadControls to Vista-skin. When I first get to the aspx page panel 1 is shown (visible=true) and panel 2 is hidden (visible=false). Vista skin works and everything looks fine, but when I click on the continue button which hides panel 1 and shows panel 2 the Vista skin stops working. All the RadControls look strange. If I click on the back button and then on the continue button again the Vista look starts and everything looks as it should. Without the RadAjaxPanel this works fine.
What is the problem and how can I get it to work?
The principle code looks like this:
/***** UserControl (Without a lot of tags/attributes) ******/
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
<asp:Panel ID="pnl1" runat="server" CssClass="candidatePersonalInfoPanel">
<telerik:RadTextBox ID="txt1" runat="server" />
<telerik:RadComboBox ID="ddl1" runat="server" />
</asp:Panel>
<asp:Panel ID="pnl2" runat="server" Visible="false">
<telerik:RadTextBox ID="txt2" runat="server" />
<telerik:RadComboBox ID="ddl2" runat="server" />
</asp:Panel>
<asp:Button ID="btnBack" CausesValidation="false" runat="server" Text="« Back" />
<asp:Button ID="btnContinue" CausesValidation="true" runat="server" Text="Continue »" />
</telerik:RadAjaxPanel>
/***** SkinFile.skin ******/
<telerik:RadComboBox runat="server"
Skin="Vista">
</telerik:RadComboBox>
<telerik:RadTextBox runat="server"
Skin="Vista"
InvalidStyleDuration="100">
</telerik:RadTextBox>
Hi,
I want to find RadComboBox on a page with jquery and set some text to this control. My code:
| $telerik.$("[id$='RadComboBox1']").set_text('sas'); |
but it doesn't work properly. Why?
With $find it works fine:
| contentWin.$find("RadComboBox1").set_text('asdfgh') |