AutoDataGridViews 1.0.4
dotnet add package AutoDataGridViews --version 1.0.4
NuGet\Install-Package AutoDataGridViews -Version 1.0.4
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="AutoDataGridViews" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutoDataGridViews" Version="1.0.4" />
<PackageReference Include="AutoDataGridViews" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AutoDataGridViews --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AutoDataGridViews, 1.0.4"
#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.
#:package AutoDataGridViews@1.0.4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AutoDataGridViews&version=1.0.4
#tool nuget:?package=AutoDataGridViews&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AutoDataGridViews
Description
AutoDataGridViews is a custom winform Control inherited from the class Systme.Windows.Forms.DataGridView
Example: This project is a C# library that provides [functionality].
Features
- Strong code dependencies using Reflections and Attributes
- Safe Code stype using type-based datagridview and table (instead of System.Data.DataTable)
- Compatibility with relational database services such as MySQL.
Installation
Visit to https://github.com/Churnba/AutoDataGridViews
NuGet Installation
To install the package via NuGet, use the following command: PM> NuGet\Install-Package AutoDataGridViews -Version 1.0.4
Dependencies
This project has the following dependencies:
- System.Windows
Usage
Once the project is installed, you can use it as follows:
Basic Usage
using AutoDataGridViews;
using MySql.Data.MySqlClient; // if needed
//Windows Form Designer generated code
private void InitializeComponent()
{
var autoDataGridView1 = new AutoDataGridView();
//...
autoDataGridView1.Initialize(new AutoDataGridViewConfig()
{
ShowAddRowToolStrip = false,
ShowDeleteRowToolStrip = false,
SubscribeDefaultCellFormatting = false,
SubscribeDefaultCellParsing = false,
});
_ = Task.Run(async ()=>
{
var table = await LoaderAsync(/*your strConn*/);
table.AllApply();
autoDataGridView1.Invoke(() =>
{
autoDataGridView1.ShowTable(table, IsBinding:true, readonlyPK:true);
});
});
}
class ExampleData : DataBase<ExampleData>
{
[Primary]
[AutoIncrement]
public int Id { get; set; }
public int? Age { get; set; }//NULLABLE
[MaxSie(45)]
public string name {get; set;} = string.Empty;//NOT NULL
[MaxSie(15)]
public string PhoneNumber {get;set;} = string.Empty;//NOT NULL
[Generated]
[MaxSie(45)]
public string FirstName => name.Split(' ').Last();
[MaxSie(45)]
public string? EmailAddress {get; set;}//NULLABLE
}
public class ExampleDataCollection : TableBase<ExampleData>
{
public override string Database => "DB_name";
public readonly static string NAME = nameof(ExampleData);
public ExampleDataCollection() : base(NAME)
{
}
public ExampleDataCollection(int capacity) : base(NAME, capacity)
{
}
public static async Task<ExampleDataCollection> LoaderAsync(string connStr)
{
using MySqlConnection conn = new MySqlConnection(connStr);
await conn.OpenAsync();
ExampleDataCollection table = new ExampleDataCollection();
var builder = table.SelectBuilder ?? new(table);
using MySqlCommand cmd = new(builder.SelectAll(), conn);
using var reader = await cmd.ExecuteReaderAsync();
while (await reader.ReadAsync())
{
//ITable.TryAdd is slow. (about 30ms per a single row)
//You need to override this method if you want to run fast.
table.TryAdd(reader);
}
return table;
}
}
Release Notes
[1.0.4] - 2026-04-15
✨ Added
- Added
TableGeneratorstatic class based on ILGenerator - Added
ColumnOrderAttributeclass - Added
OffsetAttributeclass
🔧 Changed
- Changed access modifier of
ColumnInfo.Formatto public
[1.0.3] - 2026-04-10
✨ Added
- Added
ITable.Add(IData data)method
🔧 Changed
- Moved part of
AutoDataGridView.ShowTablelogic toAddColumns() - Renamed class name of
CustomFormatProvidertoAutoFormatProvider
[1.0.0]
Initial release of AutoDataGridView
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0-windows7.0 is compatible. net8.0-windows was computed. net9.0-windows was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.