Click here to Skip to main content
6,596,602 members and growing! (20,242 online)
Email Password   helpLost your password?
Desktop Development » Grid & Data Controls » DataSets, DataGrids etc     Intermediate

Data Debugger Visualizer

By dotnetdan

VS 2005 debug visualizers for DataSet, DataTable, DataView, DataRow and DataColumn objects.
C#, Windows, .NET 2.0, ADO.NET, VS2005, Dev
Posted:24 Apr 2005
Updated:30 May 2005
Views:66,101
Bookmarked:83 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
26 votes for this article.
Popularity: 6.74 Rating: 4.76 out of 5
2 votes, 7.7%
1

2

3

4
24 votes, 92.3%
5

Sample Image - DataDebuggerVisualizer.gif

Introduction

These data visualizers for Visual Studio 2005 extend the Special QuickWatch for a DataSet that I found invaluable in VS 2003.

What it does?

These visualizers provide the following features:

  • Visualization for DataSets, strongly typed DataSets, DataTables, DataViews, DataRows and DataColumns.
  • Modified rows display in red.
  • Modified cells display in bold red.
  • Added rows display in blue.
  • If deleted rows exist, they can be viewed by selecting the Deleted Rows radio button.
  • A Row Filter can be established for active or deleted rows, using standard row filter expressions.
  • Additional cell and row properties display in the bottom grid. These properties are: cell original value, cell error message, row state, row error message.
  • When visualizing a DataRow, the respective row will be selected in the visualizer's grid.
  • XML representation of the DataSet can be in the format generated by the XmlSerializer (as used by the Web Service framework, for example) or by the DataSet's WriteXmlSchema and WriteXml methods.

Using the code

For now, I'll leave examination of the code as an exercise for the reader.

Technical notes

  • The visualizer DLL file is installed into your [VS8]\Common7\Packages\Debugger\Visualizers directory as part of the build. To remove it, delete the DotNetDan.Visualizers.dll file.
  • Multi-threading is used to load the visualizer form at the same time as serializing across the data from the debuggee to the debugger process. This may not be the fastest technique on non-HyperThreaded single-CPU machines, and complicates the code, so is a potential refactor target.
  • The visualizers use the new binary RemotingFormat facility of the DataSet and DataTable objects for enhancing the performance of serializing the objects across the Debuggee and Debugger processes.
  • At the time of writing, the DataGridView control wasn't particularly well documented and so getting the styles right was of more effort than expected and may not be the best way.
  • Programmatically selecting a row inside of a DataGridView (or DataGrid) is still way too hard. It requires a combination of DataViews, BindingSources and brute force. See DataTableVisualizerTab.OnVisibleChanged for the code that does the trick.
  • The bottom "grid" that displays additional cell and row properties consists of text boxes and uses the .NET 2.0 IPropertyChange interface of the DataTableProperties object for its binding.
  • I intend to look at enabling modifications to the data in the near future. Oh yeah, and improve the icons. :)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

dotnetdan


Member

Location: Australia Australia

Other popular Grid & Data Controls articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
GeneralVisual Studio 2008 PinmemberJimSchultz748:32 23 Apr '08  
GeneralRe: Visual Studio 2008 PinmemberAbsurdChampion11:43 26 Aug '08  
GeneralEnhancement needed Pinmemberabdu14:56 21 Mar '07  
GeneralNice! PinmemberLowOrbit17:59 8 Nov '06  
GeneralGood work [modified] PinmemberDanMyNews21:02 19 Jul '06  
GeneralHow do I use it? Pinmemberhongze7:14 1 Feb '06  
Generalisn't it built-in functions in vs.net 2005? PinmemberUnruled Boy4:23 30 May '05  
GeneralRe: isn't it built-in functions in vs.net 2005? PinmemberMP3Observer22:53 30 May '05  
GeneralRe: isn't it built-in functions in vs.net 2005? Pinmemberdotnetdan2:14 2 Jun '05  
GeneralRe: isn't it built-in functions in vs.net 2005? PinmemberToAoM11:19 30 Nov '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 30 May 2005
Editor: Smitha Vijayan
Copyright 2005 by dotnetdan
Everything else Copyright © CodeProject, 1999-2009
Web20 | Advertise on the Code Project