DX.GridHelpers 1.0.3

dotnet add package DX.GridHelpers --version 1.0.3
                    
NuGet\Install-Package DX.GridHelpers -Version 1.0.3
                    
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="DX.GridHelpers" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DX.GridHelpers" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="DX.GridHelpers" />
                    
Project file
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 DX.GridHelpers --version 1.0.3
                    
#r "nuget: DX.GridHelpers, 1.0.3"
                    
#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 DX.GridHelpers@1.0.3
                    
#: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=DX.GridHelpers&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=DX.GridHelpers&version=1.0.3
                    
Install as a Cake Tool

DX.GridHelpers

📦 Reusable utility library for DevExpress WinForms XtraGrid (GridView). Includes debounce-enabled row change handling (GridDebouncer<T>) and helpful extensions to simplify selection, scrolling, styling, and focused row access.

Compatible with .NET 8.0 WinForms and DevExpress 24.x

✨ Features

  • GridDebouncer<T>: Debounce logic for FocusedRowChanged with optional loading indicator
  • 🔄 GridView extension methods:
    • Row selection by value
    • Safe access to focused row or cell
    • Scroll to focused row
    • Conditional styling
    • Refresh or clear selection

📦 Installation

dotnet add package DX.GridHelpers

Your project must target net8.0-windows with <UseWindowsForms>true</UseWindowsForms> enabled in .csproj.

🚀 Quick Start

Using GridDebouncer

var debouncer = new GridDebouncer<MyRow>(
    gvwMain,
    raw => raw as MyRow,
    async row =>
    {
        // Executed after debounce delay
        Console.WriteLine($"Focused row changed: {row.Id}");
        await Task.CompletedTask;
    },
    delayMs: 300,
    loadingControl: lblLoadingIndicator
);

Disposing

debouncer.Dispose(); // When closing the form

🧩 Extension Methods

gvw.SelectRowByValue("Id", 10);                   // Selects row with Id = 10
int? year = gvw.GetFocusedCellValue<int>("Year"); // Reads cell from focused row
var row = gvw.GetFocusedRow<MyRow>();             // Safely casts focused row
gvw.ScrollToFocusedRow();                         // Scroll to focused row
gvw.RefreshCurrentRow();                          // Redraw current row
gvw.ClearSelectionSafe();                         // Clears selection
gvw.FocusFirstRow();                              // Focus top
gvw.FocusLastRow();                               // Focus bottom

🎨 Conditional Styling

gvw.SetRowStyleConditionally(
    row => (row as MyRow)?.IsPassive == true,
    Color.DarkGray,
    Color.LightYellow
);

🛠 Requirements

  • .NET 8.0 or later
  • DevExpress WinForms (XtraGrid) libraries (v24.1 or above)

🔒 License

MIT License

This project is independent and not affiliated with Developer Express Inc. DevExpress, XtraGrid, and all trademarks are property of Developer Express Inc.

🌐 Author

Rahim AYDIN
GitHub · NuGet

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  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.
  • net8.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.

Version Downloads Last Updated
1.0.3 226 5/23/2025
1.0.2 149 5/22/2025
1.0.1 149 5/22/2025
1.0.0 147 5/22/2025