DrawnTable 1.0.3

.NET 5.0 .NET Framework 4.0
dotnet add package DrawnTable --version 1.0.3
NuGet\Install-Package DrawnTable -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DrawnTable" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DrawnTable --version 1.0.3
#r "nuget: DrawnTable, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DrawnTable as a Cake Addin
#addin nuget:?package=DrawnTable&version=1.0.3

// Install DrawnTable as a Cake Tool
#tool nuget:?package=DrawnTable&version=1.0.3

DrawnTable

Custom WinForms control based on PictureBox for creating versatile tables.<br/> It's fast, uses almost no memory, doesn't have any dependencies, and not limited by limitations of WinForms since it draws itself from scrach.

Demo app

Installation

Get it from NuGet: NuGet

Features

  • Cell Drag & Drop
  • Subheaders
  • Cell Copy & Paste (using Ctrl + drag)
  • Headers can span multiple rows (or columns)
  • Cells can span multiple rows
  • Cells can overlap each other (they will be merged or replaced placeholder)
  • Cell styling (font, backound color, margin, text aligment)
  • Table styling (font, background color, border color)
  • Printing support (you can print the table or draw it using your Graphics instance)
  • Cells can be disabled (user cannot interact with them)
  • ToolTip for cells
  • Supported events:
    • CellWithValueClick, CellOverlapPlaceholderClick
    • CellCreating, CellCreated
    • CellCopied, CellPasted
    • CellDragOver, CellDragDropFinished
    • CellsMerging

Initialization

Before using the control you need to initialize it by providing list of row and column configurations:

drawnTable.Table.Create(Rows, Cols);

There is HeaderCreator class that can help you create those configurations. For example here's how to generate headers for a range of dates, and then get header index for some date:

HeaderCreator headers = new();
var columns = headers.Day.GenerateHeaders(dayStart, dayEnd, colFilter, "dd.MM, dddd");
...
int columnIndex = headers.Day.GetIndexByValue(date);

See demo appication for more usage samples.

Demo app

Product Versions
.NET net5.0-windows7.0
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 347 7/30/2021
1.0.2 255 2/15/2021