Telerik: RadEditor Change Content Background Color

When it comes to the Telerik RadEditor and the background color of the content within it you may run into some issues if your website’s layout and design incorporates a black background.
This is because the RadEditor, by default, takes the background color of the actual web page (body) as the color it uses for its content area. In order to override the content area of the RadEditor so that you have a clean white background and a black font you must add a Style element to the RadEditor’s markup which points to a Cascading Style Sheet (.CSS) file with the Body selector overridden to contain the colors you want.
Here is how you add the style to your RadEditor instance:

Here is what the content of the CSS file looks like to get a white background with black text:
    color: #000;
    background-color: #fff;
    background-image: none;
    margin: 0px;
    text-align: left;

Telerik: RadChart working in DotNetNuke

In order to get the RadChart charting controls to work correctly in DotNetNuke you must first take into account that DNN rewrites all URLs to what are called ‘Pretty URLs’. Because of this the RadChart has a hard time locating the URL of the HttpHandler which creates the chart images.
To fix this you need to help the RadChart instance out by telling it where the HttpHandler URL is. This can be done by setting the HttpHandler URL through the RadChart’s HttpHandlerUrl property in the Page Load event of your DNN module control as shown below.

myRadChartInstance.HttpHandlerUrl = ResolveUrl("ChartImage.axd") ;


Telerik: Execute JavaScript on RadAjaxPanel PostBack

If you need to execute a JavaScript script upon the return of your RadAjaxPanel for example to slowly fade or hide a notification message to a user such as in the image below.

To accomplish this all you need to do is add your script to the RadAjaxPanel through the ResponseScript property.
Here is the code for hiding the #Message div after the Ajax call has returned it uses the JQuery JavaScript library.

private void AddHideScript()
            rapCities.ResponseScripts.Add("$('#Message').animate({ opacity: 'hide' }, 5000);");

Telerik: JavaScript Confirm in RadAjaxPanel

To properly warn users before they delete an item from a RadGrid within a RadAjaxPanel you need to add a OnClientClick client side event to the delete button as follows.

<asp:Button ID="btnDelete" runat="server" Text="Delete" CommandName="DeleteItem" CausesValidation="false" OnClientClick="if(!confirm('Warning: This City will be permanently deleted. Would you still like to continue?'))return false;" />