CustomDataGridView 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package CustomDataGridView --version 1.0.4                
NuGet\Install-Package CustomDataGridView -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="CustomDataGridView" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CustomDataGridView --version 1.0.4                
#r "nuget: CustomDataGridView, 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.
// Install CustomDataGridView as a Cake Addin
#addin nuget:?package=CustomDataGridView&version=1.0.4

// Install CustomDataGridView as a Cake Tool
#tool nuget:?package=CustomDataGridView&version=1.0.4                

CustomDataGridView

CustomDataGridView is a versatile and customizable DataGridView control for .NET WinForms applications. This project aims to enhance the functionality and appearance of the standard DataGridView by providing additional features and customization options.

Features

  • Column Types: Supports various column types, including text, checkbox, button, and custom column types.

  • Cell Formatting: Easily customize the appearance of cells using formatting options.

  • Sorting and Filtering: Enable sorting and filtering capabilities for efficient data management.

  • Cell Validation: Implement cell validation to ensure data integrity.

  • Custom Styling: Tailor the appearance of the DataGridView to match your application's design.

  • Data Binding: Seamlessly bind data from various sources to the CustomDataGridView.

  • Column Selection and Configuration: Allow users to dynamically select columns, return a JSON configuration, and set the configuration via JSON.

Getting Started

Prerequisites

  • .NET Framework 4.5 or later

Installation

  1. Clone the repository:

    git clone https://github.com/joao-a-costa/CustomDataGridView.git
    
  2. Reference the CustomDataGridView library in your project.

  3. Build and run your project.

Usage

  1. Adding CustomDataGridView to your Form:

    using CustomDataGridView;
    
    // ...
    
    CustomDataGridView customDataGridView1 = new CustomDataGridView();
    this.Controls.Add(customDataGridView1);
    
  2. Configuring Columns:

    customDataGridView1.Columns.Add("ID", "Item ID");
    customDataGridView1.Columns.Add("Name", "Item Name");
    customDataGridView1.Columns.Add("Price", "Item Price");
    
    // Customize column properties
    customDataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
    
  3. Data Binding:

    List<Item> itemList = GetItemList(); // Replace with your data source
    customDataGridView1.DataSource = itemList;
    
  4. Handling Events:

    private void customDataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
    {
        // Handle cell click event
    }
    
    private void customDataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
    {
        // Handle cell validation
    }
    
    // Add more event handlers as needed
    
  5. Column Selection and Configuration:

    Allow users to dynamically select columns and configure the grid. Return a JSON configuration and set the configuration via JSON.

    // Get JSON configuration
    string jsonConfiguration = customDataGridView1.GetConfigurationAsJson();
    
    // Set configuration from JSON
    customDataGridView1.SetConfigurationFromJson(jsonConfiguration);
    

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository.
  2. Create a branch: git checkout -b feature/your-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature.
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Special thanks to contributors and users for their valuable feedback.

Feel free to explore and extend the functionality of CustomDataGridView for your WinForms applications! If you encounter any issues or have suggestions, please open an issue on the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • 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.

Version Downloads Last updated
1.0.27 218 3/7/2024
1.0.26 123 3/6/2024
1.0.25 129 2/27/2024
1.0.24 172 2/9/2024
1.0.23 131 2/8/2024
1.0.22 108 2/5/2024
1.0.21 109 2/2/2024
1.0.20 120 1/29/2024
1.0.19 125 1/19/2024
1.0.18 131 1/12/2024
1.0.17 104 1/11/2024
1.0.16 100 1/11/2024
1.0.15 157 1/10/2024
1.0.14 144 1/9/2024
1.0.13 126 1/8/2024
1.0.12 177 12/7/2023
1.0.11 103 12/7/2023
1.0.10 135 12/7/2023
1.0.9 148 12/6/2023
1.0.8 121 12/5/2023
1.0.7 132 12/4/2023
1.0.6 158 11/26/2023
1.0.5 125 11/26/2023
1.0.4 124 11/26/2023
1.0.3 136 11/26/2023
1.0.2 114 11/26/2023
1.0.1 119 11/26/2023
1.0.0 120 11/26/2023