CustomDataGridView 1.0.27

dotnet add package CustomDataGridView --version 1.0.27                
NuGet\Install-Package CustomDataGridView -Version 1.0.27                
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.27" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CustomDataGridView --version 1.0.27                
#r "nuget: CustomDataGridView, 1.0.27"                
#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.27

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

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 231 3/7/2024
1.0.26 128 3/6/2024
1.0.25 134 2/27/2024
1.0.24 183 2/9/2024
1.0.23 140 2/8/2024
1.0.22 115 2/5/2024
1.0.21 114 2/2/2024
1.0.20 125 1/29/2024
1.0.19 132 1/19/2024
1.0.18 136 1/12/2024
1.0.17 109 1/11/2024
1.0.16 105 1/11/2024
1.0.15 162 1/10/2024
1.0.14 149 1/9/2024
1.0.13 131 1/8/2024
1.0.12 182 12/7/2023
1.0.11 110 12/7/2023
1.0.10 140 12/7/2023
1.0.9 153 12/6/2023
1.0.8 126 12/5/2023
1.0.7 137 12/4/2023
1.0.6 163 11/26/2023
1.0.5 129 11/26/2023
1.0.4 129 11/26/2023
1.0.3 141 11/26/2023
1.0.2 119 11/26/2023
1.0.1 124 11/26/2023
1.0.0 125 11/26/2023