Telerik blogs
  • Desktop WinForms

    Styling Cells in RadGridView for WinForms

    In RadGridView you have to handle the CellFormatting event when you want to customize the look and feel of grid cells. This is so because RadGridView uses UI virtualization. It creates elements only for cells that are currently visible - when scrolling they are reused. Of course, it will be much easier if we could access the cell directly and set its visual properties without an event. In our next release (Q2 2010) this will be possible. By using the Style property you can set the desired background color or change the font size. Here is a sample: this.radGridView1.Rows[5].Cells["Name"].Style.BackColor = Color.Red; this.radGridView1.Rows[5].Cells["Name"].Style.Font = new Font(SystemFonts.DialogFont, FontStyle.Italic);   All...
    May 11, 2010 1 min read
  • Desktop WinForms

    Flexible data conversion with RadGridView for WinForms vNEXT

    One of the new features that will come with the next version of RadGridView is the new data conversion layer. In our daily work we have often got into troubles in visualizing and formatting concrete types as other types. Sometimes the data source is not compatible with the bind target. Hence, you need to create a facade that converts the data to desired type. Let’s say that you bind the grid to a source that is incompatible with the columns that you want to show, for example a GridViewCheckBoxColumn for char field instead of GridViewTextBoxColumn. How can you accomplish that? The new version of RadGridView will...
    April 30, 2010 4 min read
  • Web ASP.NET AJAX

    RadGrid for ASP.NET Ajax and LINQ

    One of the most-asked questions when it comes to the ASP.NET Ajax RadGrid is "How do I improve performance?". We have covered this in some Webinars and videos that can be found on Telerik TV in a series which has been released in three parts: Part One, Part Two and Part Three. One thing I wanted to bring up with respect to performance is the usage of LINQ (Language Integrated Query) and our RadGrid. Although LINQ has been out since the initial release of .NET 3.5 I still receive quite a few questions when it comes to using it with our...
    April 28, 2010 9 min read
  • Release

    RadGridView for WinForms vNEXT is coming

    The new version of RadGridView is coming in May (as beta) and I am eager to show you some of the new features. There are many methods to indicate errors in RadGridView. However, until now it didn’t support the most natural and easy way for this - the IDataErrorInfo interface. Things have changed, so let me show you how to use this interface.   As MSDN says,“IDataErrorInfo provides the functionality to offer custom error information that a user interface can bind to.” Actually, you don't need to know anything about this interface. You can just set the ErrorText property of the desired row or cell: this.radGridView1.Rows[5].ErrorText = "There...
    April 28, 2010 2 min read
  • Web

    Master-Details with RadGridView for Silverlight 4, WCF RIA Services RC2 and Entity Framework 4.0

    I have prepared a sample project with the Silverlight 4 version of RadGridView released yesterday. The sample project was created with Visual Studio 2010, WCF RIA Services RC 2 for Visual Studio 2010, and ADO.NET Entity Framework (.NET 4). I have decided to use the SalesOrderHeader and SalesOrderDetails tables from the Adventure Works Database, because they provide the perfect one-to-many relationship: I will not go over the steps for creating the ADO.NET Entity Data Model and the Domain Service Class. In case you are not familiar with them, you should start with Brad Abrams’ series of blog posts and read this blog after that. To enable the...
    April 23, 2010 2 min read