Telerik blogs

Latest

  • Web

    Executing JavaScript function from server-side code

    This is a pretty common scenario when working with WebForms. There are many ways to achieve the desired result, but they have one thing in common – you should make sure that the controls are fully loaded in the page before trying to get a reference to them and use them in your JavaScript code. In ASP.NET it is pretty straightforward to do that. For example you could use a label: ASPX <head runat="server">     <title>Untitled Page</title>     <script type="text/javascript">     function calledFn()     {         alert("code fired");      }     </script> </head> <body>     <form id="form1" runat="server">         <asp:Button ID="Button1" runat="server" Text="Run JavaScript Code" OnClick="Button1_Click" />         <asp:Label ID="Label1" runat="server"></asp:Label>    ...
  • Web

    Cannot discover WCF services in your Silverlight application?

    If you try to add service reference in your Silverlight application and you simply cannot discover any services in the solution using the Add Service Reference tool here is the way how to solve it. Note that the issue occurs both in Silverlight 2 and Silverlight 3 Beta.     1. Uninstall your Silverlight tools for Visual Studio      2. Go to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE or the place you have installed your Visual Studio environment.     3. Delete the file Microsoft.VisualStudio.ServicesProxy.dll      4. Install again Silverlight tools for Visual Studio and note that your file will be created again. There seems to be something wrong with the installer of Silverlight tools, which...
  • Web

    How to show hidden panes in the Silverlight docking control

    Usually, when you use docking manager you want to be able to re-open the closed panes. This looks as simple as setting the IsHidden property of the pane to False. However, this does not cover all the cases. The pane might be in a ToolWindow and this ToolWindow might be closed by its X button. In this case, the pane would not be hidden, but it would not be visible either as it is in the hidden window. Another approach might be closing the last pane in a ToolWindow, thus triggering closing the window, too. In this case the pane will...
    May 05, 2009
  • Web ASP.NET AJAX

    Integrating RadEditor for ASP.NET AJAX with the WIRIS family of products

    We have received several requests to integrate a formula editor for RadEditor or allow editing of MathML. The wonderful guys at WIRIS(http://www.wiris.com/) have the right tools for this job so we decided to post an example of the WIRIS formula editor and CAS working as RadEditor dialogs.   A couple of words about the formula editor - it uses a Java applet so be sure to have the Java plugin installed in your browser. We used the basic ASPX demo that WIRIS offers as a base for our integration example. The demo can be seen here - http://www.wiris.eu/demo-aspx/pluginwiris/generic/. There are two editors...
    April 30, 2009
  • Web

    Using IValueConverter to format values in RadControls for Silverlight

    It’s often necessary to modify or format some of the raw data received by your data tier application or other data sources. In Silverlight, you can create your own value converter and introduce your own formatting rules. In this blog post I will create a simple value converter that formats double values, and then use it with a RadComboBox. First, let’s create a class that will represent our data source. The equivalent of this class in more realistic scenario would be a proxy class generated by your data tier application in case you use RIA services.     public class Data : List<Item>       {           public Data()           {               this.Add(new Item() { Name = "Ferrari", Price = 120000 });               this.Add(new Item() { Name = "Mercedes", Price = 100000 });...
    April 29, 2009