Telerik blogs

Latest

  • Web

    Designing N-Tier Applications with OpenAccess ORM

    A very important question recently crossed my inbox, and it essentially asked: “Can you design and build Enterprise-grade n-tier applications with OpenAccess? Or does it force you violate principles of good multi-tier application design to make the ORM features work?” It was a great question and I was surprised to find that there is not more info in the online docs to address this. So, to help everyone benefit from this question’s answer, here are some details about building n-tier applications with OpenAccess. WHAT DOES GOOD N-TIER ARCHITECTURE LOOK LIKE WITH OPENACCESS? Let me preface this discussion by saying there is no “absolute” right...
    April 28, 2009
  • Web

    Attaching a ContextMenu on a TreeView with RadControls for Silverlight

    Telerik RadControls for Silverlight provide a very powerful ContextMenu control, that supports right click, modifier keys and that can be easily attached to any visual element. In this article I will show how to attach RadContextMenu to a data-bound RadTreeView and perform actions on the clicked treeview items, depending on the selection in the context menu. For simplicity, here I will use a treeview, bound to a static collection, but it can be easily extended to load its items from a web service: <UserControl x:Class="ContextMenuInTreeView.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ContextMenuInTreeView" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"> <UserControl.Resources> <local:DataViewModel x:Key="ViewModel" /> <telerik:HierarchicalDataTemplate x:Key="TreeViewItemTemplate" ItemsSource="{Binding Children}"> <TextBlock Text="{Binding Text}"> <telerikNavigation:RadContextMenu.ContextMenu> <telerikNavigation:RadContextMenu> <telerikNavigation:RadMenuItem Header="New Child" /> <telerikNavigation:RadMenuItem Header="New Sibling" /> <telerikNavigation:RadMenuItem Header="Delete" /> </telerikNavigation:RadContextMenu> </telerikNavigation:RadContextMenu.ContextMenu> </TextBlock> </telerik:HierarchicalDataTemplate> </UserControl.Resources> <StackPanel Background="White" DataContext="{StaticResource...
    April 27, 2009
  • Web

    Lightweight DataTable for your Silverlight applications

      UPDATE: Please visit this post for more info about dynamic objects binding!   Since there is no DataTable in Silverlight I’ve created small class that can be used to generate columns and rows in runtime in similar to the real DataTable way: DataTable table = new DataTable();table.Columns.Add(new DataColumn() { ColumnName = "ID", DataType = typeof(int) });table.Columns.Add(new DataColumn() { ColumnName = "Name", DataType = typeof(string) });table.Columns.Add(new DataColumn() { ColumnName = "UnitPrice", DataType = typeof(decimal) });table.Columns.Add(new DataColumn() { ColumnName = "Date", DataType = typeof(DateTime) });table.Columns.Add(new DataColumn() { ColumnName = "Discontinued", DataType = typeof(bool) });for(var i = 0; i < 1000; i++){ DataRow row = new DataRow(); row["ID"]...
  • Web

    Web 2.0 font sizes with RadInput

    If you’ve spent much time visiting “web 2.0” sites, you know that large font sizes are totally “in vogue” for data entry forms. Not only are they easy for all audiences to read, but they also imply a certain level of simplicity on a website. In fact, there are even some UX experts suggesting larger font sizes are better now that high-resolution monitors are the norm and not the exception. If you’ve got a “beautifully designed” web 2.0-style site, though, and you’re working with RadInput, you know that the default skins “force” their own font size. What do you do if you...
    April 23, 2009
  • Web

    RadDocking Save/Load layout

    Quite often the users might want to save and then restore the layout they have previously left when closing an application that uses any kind of docking layout management. The powerful Save/Load layout mechanism of Telerik RadDocking enables such users to accomplish this task in an absolutely straight-forward manner. The developers building the application can use the advanced API of the control and implement the needed logic with just a few lines of code. The example below demonstrates how to persist the panes’ position in a Weather Forecast Browser built specifically for this blog post. This is the first of series of blog...
    April 22, 2009