DrawnTable 1.1.1

dotnet add package DrawnTable --version 1.1.1                
NuGet\Install-Package DrawnTable -Version 1.1.1                
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.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DrawnTable --version 1.1.1                
#r "nuget: DrawnTable, 1.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. 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.1.1

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

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 Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net7.0-windows was computed.  net8.0-windows was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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.1.1 612 5/24/2023
1.0.2 820 2/15/2021