diff --git a/Terminal.Gui/Views/TableView/TableView.cs b/Terminal.Gui/Views/TableView/TableView.cs
index 6ae8dd92f..e40354001 100644
--- a/Terminal.Gui/Views/TableView/TableView.cs
+++ b/Terminal.Gui/Views/TableView/TableView.cs
@@ -1,4 +1,5 @@
using System.Data;
+using System.Globalization;
namespace Terminal.Gui;
@@ -16,7 +17,7 @@ public delegate ColorScheme RowColorGetterDelegate (RowColorGetterArgs args);
/// View for tabular data based on a .
/// See TableView Deep Dive for more information.
///
-public class TableView : View
+public class TableView : View, IDesignable
{
///
/// The default maximum cell width for and
@@ -2307,4 +2308,62 @@ public class TableView : View
/// The horizontal position to begin rendering the column at
public int X { get; set; }
}
+
+ bool IDesignable.EnableForDesign ()
+ {
+ var dt = BuildDemoDataTable (5, 5);
+ Table = new DataTableSource (dt);
+ return true;
+ }
+
+ ///
+ /// Generates a new demo with the given number of (min 5) and
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static DataTable BuildDemoDataTable (int cols, int rows)
+ {
+ var dt = new DataTable ();
+
+ var explicitCols = 6;
+ dt.Columns.Add (new DataColumn ("StrCol", typeof (string)));
+ dt.Columns.Add (new DataColumn ("DateCol", typeof (DateTime)));
+ dt.Columns.Add (new DataColumn ("IntCol", typeof (int)));
+ dt.Columns.Add (new DataColumn ("DoubleCol", typeof (double)));
+ dt.Columns.Add (new DataColumn ("NullsCol", typeof (string)));
+ dt.Columns.Add (new DataColumn ("Unicode", typeof (string)));
+
+ for (var i = 0; i < cols - explicitCols; i++)
+ {
+ dt.Columns.Add ("Column" + (i + explicitCols));
+ }
+
+ var r = new Random (100);
+
+ for (var i = 0; i < rows; i++)
+ {
+ List