Jesse Johnston
.NET Dev. Good times with .NET and coffee

DataSet Visualizer for Visual Studio 2005

Sunday, 11 December 2005 22:49 by jesse

I work with DataSets quite a bit, and I'm a fan of the DataSet visualizers that were available for VS 2003:  The DataSet QuickWatch and the XML Visualizer were two that I used a lot.  In particular, XML Visualizer allowed you to display all of the different data versions available in a DataRow.

Visual Studio 2005 ships with a DataSet visualizer, but it doesn't make all of the row versions available, nor does it show the row state.  So, I decided to learn how to write a visualizer for VS2005.  My DataSet visualizer shows row state and all of the available row versions.  No editing of the data (yet).  Download it here.

kick it on DotNetKicks.com

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Tags:   ,
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

NetWorthIQ

Sunday, 11 December 2005 02:27 by jesse

A quick shout out to friend and colleague Ryan Williams, who with the guys at Fourio have put together a social networking tool for tracking your net worth and comparing it with others in your area / occupation / age range.  Ryan is an enthusiastic Web 2.0 guy on our team and is making it happen with NetWorthIQ.  Subscribed.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

DataGridView: Where's my tooltip?

Saturday, 10 December 2005 19:52 by jesse

If you've worked with the .NET 1.1 DataGrid control, you'll appreciate the enhanced DataGridView control of the 2.0 runtime.  I was mystified for a moment, however, when setting a tooltip on the grid failed to have any effect.  My code looked like this:

DataGridView.HitTestInfo info = grid.HitTest(e.X, e.Y);if (info.RowIndex > -1){    OrdersRow row = (OrdersRow)((DataRowView)grid.Rows[info.RowIndex].DataBoundItem).Row;    this.toolTip.SetToolTip(grid, string.Format("Order {0}, row state {1}", row.OrderID, row.RowState));}else    this.toolTip.SetToolTip(grid, null);

Tooltip.SetToolTip is the standard mechanism for setting a tooltip dynamically.  If it's a static value you want, you can of course set the Tooltip extender property on the grid at design time.

To make a long story short, DataGridView provides a property ShowCellToolTips that when enabled, provides it's own tooltips in place of any Tooltip component.  So, to use a Tooltip component as shown above, set DataGridView.ShowCellToolTips to false.

The built-in tooltips provided by DataGridView allow a great deal of flexibility in providing cell-level tooltips.  Without any extra work, setting ShowCellToolTips to true (the default) will cause a tooltip to be displayed if a cell value is truncated because the column is too narrow.  You can also set the ToolTipText property on a specific DataGridViewCell to display your own cell-specific tooltip.  Finally, you can handle the DataGridView.CellToolTipTextNeeded event to provide tooltip text dynamically.

kick it on DotNetKicks.com

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Tags:  
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed