in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

Paul Kimmel's Blog

ASPxGridView Columns: Point A to Z

Sometimes understanding how something is designed helps one understand all of the resources available. The ASPxGridView is very easy to use at its most fundamental level. Bind the ASPxGridView to a data source, set a few properties and you have a wide variety of viewing and editing features at your disposal. The ASPxGridView supports row editing, forms editing, and grid nesting—as described in our book Professional DevExpress ASP.NET Controls. However, all of this functionality comes at a cost. Fortunately for our customers the cost has been paid in terms of design and development by our internal ASPxGridView programmers. You could in fact use the ASPxGridView daily and not be aware of all of the infrastructure and plumbing that makes it so powerful yet easy to use.

Figure 1 shows you all of the interfaces and classes that make the grid columns work starting with the .NET Object class down to specific kinds of grid columns, like the GridViewDataBinaryImageColumn. (Read the model from top to bottom.) When you use the designer to bind data to a grid the actual columns are generated as instances of the GridViewDataxxx columns, rendered declaratively as tags in the ASPX. The specific column class determines the kind of editor the user will experience—whether a combobox, date/time editor, button or link.

Of course, you don’t have to memorize this information (or the model) to use the ASPxGridView but on rare occasions it doesn’t hurt to know. One such occasion is when you have a binary blob column that is actually an image. The ASPxGridView won’t guess that BLOB (binary columns) are always images, so images may be displayed—and generated as a GridViewDataTextColumn—as text. Usually the content is something like system.byte[]. Obviously this isn’t what you want. By knowing that the data is an image you can simply change the ASPX tag from GridViewDataTextColumn to a GridViewDataBinaryImage column and the image will magically appear at runtime.

System
Figure 1: The classes and interfaces that make up the ASPxGridViewColumns.

I was talking to a charming woman on the plane Monday, and in passing we talked about books. She said that she hadn’t read the Harry Pottter books. I said that in fact I had and that I enjoyed them. I enjoy them because an implied message in the books is that new knowledge can be obtained from reading, and knowledge imparts a magical power: information that can be used, employed, acted upon.

Published Nov 11 2009, 07:52 PM by Paul Kimmel (Developer Express)

Comments

 

Bruno said:

Nice to see Sparx' Enterprise Architect being used :-)

November 11, 2009 4:26 PM
 

Paul Kimmel (Developer Express) said:

Sparx makes a great UML product and the price is fantastic. Do you work for Sparx?

November 11, 2009 5:03 PM
 

Bruno said:

No, but I have been working with it since its early days, we used to be one of the resellers. I love the product and am still amazed at the value for money (much the same as when it comes to DevExpress products).

The integration between EA and Visual Studio is fantastic as well, do you guys use it?

(Coincidentally, I am just looking into some EA Add-Ins we may decide to rebuild using DevExpress controls).

November 11, 2009 5:45 PM
 

Chris Walsh [DX-Squad] said:

I agree, we use Sparx for our UML modelling and its amazing!

November 11, 2009 6:00 PM
 

Martijn van IJperen said:

Do you have a larger view of the UML model, can't read it well.

November 12, 2009 6:05 AM
 

Paul Kimmel (Developer Express) said:

I increased the size but it I still a little hard to read. I will see what I can do.

Paul

November 12, 2009 12:20 PM

Leave a Comment

(required)  
(optional)
(required)  
Verification code: Required
   
Add
Copyright © 1998-2010 Developer Express Inc.
ALL RIGHTS RESERVED