tags:

views:

18

answers:

1

I have several datatable/dataset visualizers installed in my Visual Studio 2008. Launching a visualizer manually in the IDE is a bit time consuming. While debugging, I would like to display a datatable visualizer with a datatable's data automatically through code.

I want to put a breakpoint on the line after invoking the visualizer. I know the visualizer window is modal but that's OK during debugging.

Is this possible?

(The other route which I might consider, if above is not possible, is to display a grid with the data in a winform window)

+1  A: 

How about just a DataGridView ?

using(Form form = new Form())
using(DataGridView grid = new DataGridView()) {
   grid.Dock = DockStyle.Fill;
   grid.DataSource = table;
   form.Controls.Add(grid);
   form.ShowDialog(this);
}
Marc Gravell
I am not sure why the first (only) column width is not changing.form.ShowDialog(this);grid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;grid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;grid.Refresh();
Tony_Henrich