Using GridViewCell template you can create your own template columns in less than a minute: <telerik:RadGridView Name="RadGridView1" IsFilteringAllowed="False" IsReadOnly="True" ShowGroupPanel="False" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerikGridView:GridViewDataColumn HeaderText="ID" UniqueName="ID" />
<telerikGridView:GridViewDataColumn Width="400" HeaderText="Name" UniqueName="Name">
<telerikGridView:GridViewDataColumn.CellStyle>
<Style TargetType="telerikGridView:GridViewCell">
<Setter Property="Template">
...
Before going into details about how you could refactor a switch statement first I should say that there's nothing wrong with this statement (as with any other C#, VB.NET or whatever statement). Most probably you would want to refactor a switch in one of these scenarios: It has reached a certain amount of lines of code so that you need to scroll in order to see all the cases. When you want to introduce some new functionality you inevitably end up adding new cases to the switch statement. When you implicitly check for a type in a switch statement. In most...
As telerik.com grows bigger, you may start finding it time-consuming to navigate to the deeper pages in the site hierarchy. The increasing number of clicks is getting irritating, especially for regular visitors of the site. We tried to tackle this problem by introducing a supplemental navigation tool (you need to be logged in to see it). The "Your Links" menu is straight-forward to use: bookmark, rearrange and delete your favorite telerik.com pages. 1. Go to the page you want to bookmark and expand the menu. 2. Bookmark the currently opened page by pressing the "Add Current Page" button. 3. Type in the name of...
The Telerik charting team is hard at work on making our WPF chart compatible with Silverlight. In the process we are faced with numerous limitations of SL. One of the more cunning problems I’ve faced was the fact that there are still no layout transforms available which leads to some wacky problems when you try to rotate text. Let’s assume a very simple layout consisting of a single grid with two columns, one with width=”auto” and the other with width=”*”. The first column contains a string of text. Here is how it looks before any transforms are applied: <Grid x:Name="LayoutRoot" Background="SkyBlue">
...
The RadRotator is a control that is easily overlooked in the RadControls for ASP.NET AJAX suite. It is not one of the more compelling controls like the RadGrid or the RadEditor, but it certainly provides a key set of functionality that is important in order for Telerik to claim that our suite is the most complete ASP.NET AJAX suite on the market. I’d like to take some time to show you what we have done to make the RadRotator a control that makes it easy for you, dear developer, to add rich functionality to your web applications. Overview The RadRotator for ASP.NET AJAX is...
I’m happy to announce that with Q1 2009 version of RadControls for WPF and Silverlight you will be able to get the grid data in different formats using three extension methods: ToHtml(), ToText() and ToCsv(). I’ve made small demo to demonstrate how to use all these in a Silverlight web application for Word, Excel and Csv export: [Download]...
Building on my previous post where I talked about how to bind data to the RadGridView, today I want to show how you can display hierarchical data in the grid. I will follow the same concept of building an application for a car repair shop to manage vehicles in for repair. I will leverage two classes to display the data. The original Car class which was used previously and a new CustomerComplaint class. The Complaint property of the Car object was initially a string, but we need to allow for several issues to be reported so we will use the CustomerComplaint class to...
Today Telerik released the second service pack for the Q3 2008 RadControls for WinForms. It's been about a month and a half since SP1, and in that time a lot of great fixes and improvements have been added to the controls. The release notes, as always, have the full list of what's changed in this release, but here are a couple of enhancements of interest. RadGridView Introduced an API for customizing XML Serialization Enhancements to the Validation API Improvement of the memory footprint and resource management RadDockingManager Improved layout with Tabbed Documents New property AutoHideSize which can be applicated to DockPanels and TabbedDocuments While...
I’ve made small demo how to perform server paging, sorting and filtering with RadGridView for Silverlight using ADO.NET DataServices and dynamic LINQ: All operations are applied directly to the data-base server: And you have minimal traffic between server and client: With this approach you can handle millions of records! Enjoy! [Download]...
Whenever you start working with a modern ORM tool, one of the biggest challenges is figuring out how to manage the "scope" (or sometimes called "context" or "data context"). It is this transactional space where the ORM tool keeps track of changes being made to "persistent objects" in your application so that they can be saved to your "persistence layer" (usually a database) when you're ready to commit them. But figuring out when to create a scope, when to close it, and all the annoying problems that result from closing a scope too early can be very frustrating, and they...