Telerik blogs

Latest

  • Web ASP.NET AJAX

    Embedding YouTube video in RadListView for ASP.NET AJAX

    Have you ever thought of embedding a YouTube video in the context of a data-bound control? Recently, a client of ours asked for such a demo and this inspired me to create a code-library project that features this scenario and uses RadListView for ASP.NET AJAX as ‘videos host’. Depending on your goal, you can control the player via JavaScript code or you can just embed a static object. In the latter case you will need something like this: 1: <object width="425" height="344"> 2: <param name="movie" value="http://www.youtube.com/v/QT0e5XqNZdo&hl=en_US&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b"></param> ...
    January 29, 2010
  • Web ASP.NET MVC

    Visual Style Builder now supports Telerik Extensions for ASP.NET MVC

    The Visual Style Builder for ASP.NET is now compatible with the shiny MVC extensions. The generated CSS code got a bit smaller, too. In order to celebrate this, I give you the lovely PinkPanther skin, for your visual pleasure.
    January 28, 2010
  • Web

    Calculated column in RadGridView for Silverlight + math expressions

    When the data layer does not allow to perform calculations we often need to harness the UI. Here is a a simple case  - in our business object we have the Price and the Count properties. We will have RadGridView to calculate the Total  for us in a calculated column.   Please download this sample project   If you peek into the sample project you will notice we are using a pretty standard Silverlight approach : We bind the value of the calculated column with a Binding Converter : <telerik:GridViewDataColumn Header="Total" Background="Bisque" DataMemberBinding="{Binding Converter={StaticResource CalculatingConverter}}" TextAlignment="Right" />   The calculation “logic” is in the Convert method of CalculatingConverter.cs   public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) ...
    January 28, 2010
  • Web ASP.NET MVC

    Resolving circular references when binding the MVC Grid

    Sometimes when performing ajax databinding with the MVC grid you may end up with unexpected result: server error 500. What is even stranger is that server-side binding works as expected with the same data binding code. Let’s demystify this problem: The problem You will see the following  if you use FireBug or Fiddler to inspect the response: The error message is “A circular reference was detected while serializing an object of type” followed by some type. If you google this up you will find out that this exception is thrown by the JavaScriptSerializer class because of circular references detected. “What the heck is a...
    January 25, 2010
  • Web

    Math toolbar for column headers in RadGridView for Silverlight

      A client has recently asked for these little fancy math toolbars in the column header. I found it a great idea and thought it might be useful to share the way of implementing this with RadGridView for Silverlight.   *Since RadGridView for WPF shares the same code base  the approach bellow may be used for both platforms ( Silverlight and WPF ) .   Things are easy with RadGridView !   To have this in your project follow these three easy steps :   1. Copy the MathToolBar user control from the attached sample project (MathToolBar.xaml, MathToolBar.cs). MathToolbarDemo.zip 2. Replace the default header in the column with the user control. <telerik:GridViewDataColumn ... <telerik:GridViewDataColumn.Header> <local:MathToolBar HeaderText="Value1"/> </telerik:GridViewDataColumn.Header> </telerik:GridViewDataColumn>   3. Adjust...
    January 22, 2010