CustomDataGridView 1.0.24

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

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

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 205 3/7/2024
1.0.26 120 3/6/2024
1.0.25 128 2/27/2024
1.0.24 171 2/9/2024
1.0.23 130 2/8/2024
1.0.22 105 2/5/2024
1.0.21 106 2/2/2024
1.0.20 119 1/29/2024
1.0.19 119 1/19/2024
1.0.18 129 1/12/2024
1.0.17 101 1/11/2024
1.0.16 99 1/11/2024
1.0.15 155 1/10/2024
1.0.14 143 1/9/2024
1.0.13 124 1/8/2024
1.0.12 176 12/7/2023
1.0.11 102 12/7/2023
1.0.10 133 12/7/2023
1.0.9 146 12/6/2023
1.0.8 119 12/5/2023
1.0.7 131 12/4/2023
1.0.6 157 11/26/2023
1.0.5 124 11/26/2023
1.0.4 121 11/26/2023
1.0.3 135 11/26/2023
1.0.2 113 11/26/2023
1.0.1 118 11/26/2023
1.0.0 119 11/26/2023