Problem solve Get help with specific problems with your technologies, process and projects.

Hints for working with GridView in VB 2005

Blogger Hannes Preishuber has posted 14 different Visual Basic 2005 GridView samples. They range from a CSS style adapter to creating a drop-down while in edit mode.

.NET 2.0 introduced the GridView as a successor to the DataGrid control. As Dino Esposito writes in Move Over DataGrid, There's a New Grid in Town:


[GridView] fully supports data source components and can automatically handle data operations, such as paging, sorting, and editing, provided its bound data source object supports these capabilities. In addition….it supports multiple primary key fields and exposes some user interface enhancements and a new model for handling and canceling events.

This definition merits mention thanks to a recent blog post by developer Hannes Preishuber, who provides a list of 14 common Visual Basic 2005 GridView functions. The post, which can be read here, includes the following samples:

  • Formatted Boundfield
  • Paging huge amount of data
  • Search data
  • Insert Record
  • Multirow select
  • Calculated row
  • Dropdown in GridView edit mode
  • Nested Master Detail
  • Rows with buttons
  • Full row select and hovering
  • Show the ordering with image
  • Delete Confirmation
  • CSS Control Adapters
  • Smarter UI callback

Preishuber admits that some of these samples may be well known to readers, while others are being replaced by new technology such as ASP.NET AJAX. Nonetheless, his post serves as a handy reference and a starting point for getting acquainted with how GridView works.

More on this topic from

Tip:  Creating flexible, customized views of data
Reference:  Presenting Data with the DataGridView Control - Ch. 6 of Data Binding with Windows Forms

Dig Deeper on .NET Framework 2.0 and Visual Studio 2005 development

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.