Telerik blogs

Latest

  • 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
  • Web

    How To: Customize RadGridView's Default Filtering Control with Attached Behaviors (Silverlight &amp; WPF)

    If you are familiar with the RadGridView‘s Custom Filtering Functionality you probably know that you can create any kind of user control to replace the default one which looks like this: Very often, however, you may be perfectly happy with the stock filtering control, but you wish you could modify and adapt it just a little bit to match your particular requirements. What should you do then? Maybe build an entirely new filtering control from scratch that looks just like RadGridView’s default one and adds this tiny bit of functionality? No, that would be insane. There is an easier way to do this....
    January 22, 2010