DX.GridHelpers
1.0.3
dotnet add package DX.GridHelpers --version 1.0.3
NuGet\Install-Package DX.GridHelpers -Version 1.0.3
<PackageReference Include="DX.GridHelpers" Version="1.0.3" />
<PackageVersion Include="DX.GridHelpers" Version="1.0.3" />
<PackageReference Include="DX.GridHelpers" />
paket add DX.GridHelpers --version 1.0.3
#r "nuget: DX.GridHelpers, 1.0.3"
#:package DX.GridHelpers@1.0.3
#addin nuget:?package=DX.GridHelpers&version=1.0.3
#tool nuget:?package=DX.GridHelpers&version=1.0.3
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 forFocusedRowChanged
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
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.