Telerik blogs

Latest

  • Desktop WinForms

    Multi-Item Drag and Drop with the RadListBox for WinForms

    Earlier this week, I ran across a forum post asking about how one would go about creating multiple RadListBoxes that supported multi-item drag and drop. This sounded like a fun challenge, so I decided to take it on. Referencing an earlier forum post that described single-item drag and drop, I came up with the following solution. Calling DoDragDrop() immediately changes the mouse pointer and readies the RadListBox for the drag-and-drop operation. Originally, I had tried calling this function in the MouseDown event, but this lead to unpredictable clunky behavior due to the fact that DoDragDrop() was getting called before I had the chance to ...
    August 27, 2009 1 min read
  • Web

    Self-reference hierarchy with Telerik TreeView for Silverlight

    Often we need to display in a TreeView flat, self-referencing data, loaded from a database, that has properties ID and ParentID (or similar) that define the hierarchy. The Telerik TreeView for ASP.NET can automatically bind itself to such data, but our Silverlight TreeView cannot do this out of the box. Fortunately, this “limitation” can be easily avoided with a simple value converter. There is a little trick, however – each data item needs a reference to its parent collection. Consider the following very simple data object: public class DataItem : INotifyPropertyChanged { private string text;   public int ID { get; set; } public int ParentID {...
    May 27, 2021 4 min read
  • Productivity

    Telerik OpenAccess WCF Wizard: How-to Video #2- Astoria

    digg_url = "http://www.stephenforte.net/PermaLink,guid,fa997be0-5dfb-4a79-b7bc-6f2f782b9493.aspx";digg_title = "Telerik OpenAccess WCF Wizard: How-to Video #2- Astoria";digg_bgcolor = "#FFFFFF";digg_skin = "normal";digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined; The following video shows how to use the Telerik OpenAccess WCF Wizard with ADO.NET Data Services. The video is done by .NET Ninja in training Peter Bahaa and uses more or less the same code I showed yesterday on my blog. Enjoy!   Telerik OpenAccess WCF Wizard Part II- Astoria from Stephen Forte on Vimeo.
    May 27, 2021 1 min read
  • Productivity

    Using ADO.NET Data Services with Telerik OpenAccess and the WCF Wizard

    digg_url = "http://www.stephenforte.net/PermaLink,guid,9a2c41de-b873-4acb-a680-78a2f130a03d.aspx";digg_title = "Using ADO.NET Data Services with Telerik OpenAccess and the WCF Wizard";digg_bgcolor = "#FFFFFF";digg_skin = "normal";digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined; I have been a big fan of using the RESTful ADO.NET Data Services (aka Astoria). If you want to use Astoria out of the box without any modifications you really have to use the Entity Framework. But as long as you are using a data access library that supports IEnumerable and IQueryable (and IUpdateable to be useful for CRUD) you can use Astoria with just a little bit of extra work.  Telerik OpenAccess supports LINQ and IUpdateable and can be used in Astoria as shown here. In a nutshell you have to first create your data access layer, then a web site to host your ADO .NET Data Service and...
    May 27, 2021 6 min read
  • Web

    Mark working hours and days in different colors with RadScheduler for Silverlight

    We received a couple of questions on how some of the days and hours in the different views of RadScheduler can be customized. The answer of this question is in the attached application illustrating how working hours and days can be  marked in orange.  The solution includes 3 easy steps : Create a custom theme using the default RadScheduler' theme. Create a ValueConverter returning the right color depending on the hour/day. Find the style applied to every hour(timeslot) and apply the converter to the Background property. To create a custom theme you can follow the steps...
    May 27, 2021 2 min read
  • Productivity

    Telerik OpenAccess WCF Wizard: How-to Video #1

    digg_url = "http://www.stephenforte.net/PermaLink,guid,1d3d07a0-ce73-4eb3-8fd4-1ec259e21a60.aspx";digg_title = "Telerik OpenAccess WCF Wizard: How-to Video #1";digg_bgcolor = "#FFFFFF";digg_skin = "normal";digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined; Last week I showed how to use the Telerik OpenAccess WCF Wizard on this blog. The wizard creates some of the boring WCF code for you automatically. You can create endpoints for WCF, Astoria, REST collection and ATOM Pub services. Our first demo used WCF, later we will show you the other services. This is what we did: Created a data access layer automatically using OpenAccess Created a WCF Service automatically using the wizard Created a Silverlight 3.0 application that used WCF to databind the Customers table to a datagrid, enabling editing automatically Here is a video by Peter Bahaa (aka Pedro), .NET ninja in training, using the wizard with the...
    May 27, 2021 1 min read
  • Productivity

    The Telerik CAB Enabling Kit and SCSF – Tutorial 3: RadTabWorkspace

    Hello everyone, and welcome to the third tutorial in my series of tutorials about the Telerik CAB Enabling Kit. Over the next two weeks, I will be covering the two workspaces provided with the TCEK. This week, we will learn how to use the RadTabWorkspace. I will be using the completed project from tutorial 2 as the base for this project. If you have not completed the second tutorial, I suggest doing so before completing this tutorial. You can find it here. Otherwise, click here to download the source code that we will be using, fire up visual studio, ...
    May 27, 2021 4 min read
  • Productivity

    Using the ObjectScope events

    Telerik OpenAccess ORM ObjectScope comes packed with all the events that are needed for managing the lifecycle of your persistent objects. You have events for Add, Remove, Refresh and Update actions. They come in –ed and –ing flavors which would mean that you can successfully iterate with your data before the changes have been made (-ing events) and after the changes have been done(-ed events) . You can subscribe to any or all of them and successfully perform some business logic over your persistent objects. Here is a basic implementation of a generic (in terms of availability for both ObjectScope and ObjectContainer)...
    May 27, 2021 2 min read
  • Desktop WinForms

    Full keyboard navigation coming in RadMenu for WinForms

    Perhaps nobody uses every bit of keyboard navigation when it comes to menus. I bet that there aren’t many of you who use F10 to activate the menu. You nevertheless expect our RadMenu to support keyboard navigation out of the box for the very few of your clients who are using the full set of navigation commands. Full keyboard support will be available in the next internal build so that you folks can give it a go: you will get accelerators, mnemonics, F10, and of course, the arrows and enter/escape keys support. The best part is that all commands will be internally...
    May 27, 2021 1 min read
  • Desktop WPF

    WPF / Silverlight: RadChart with ChartLegend as a ToolTip

    Every now and then we receive requests / inquiries which wordings may vary, but basically all come down to the same thing – my chart space is limited, how to optimize the content of the ChartArea so my data does not look so squashed? One possible solution that works in some scenarios is to hide the legend altogether. Today we will propose another option for those of you who are looking for a less “radical” remedy – display the ChartLegend as a ToolTip on demand. Actually, this is quite easy to achieve with the ToolTipService class provided by WPF /...
    May 27, 2021 2 min read