Czemi.GridFunctionsFrmWk
1.2.1
dotnet add package Czemi.GridFunctionsFrmWk --version 1.2.1
NuGet\Install-Package Czemi.GridFunctionsFrmWk -Version 1.2.1
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="Czemi.GridFunctionsFrmWk" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Czemi.GridFunctionsFrmWk" Version="1.2.1" />
<PackageReference Include="Czemi.GridFunctionsFrmWk" />
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 Czemi.GridFunctionsFrmWk --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Czemi.GridFunctionsFrmWk, 1.2.1"
#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 Czemi.GridFunctionsFrmWk@1.2.1
#: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=Czemi.GridFunctionsFrmWk&version=1.2.1
#tool nuget:?package=Czemi.GridFunctionsFrmWk&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GridFunctions
Empty Grid
bool IsEmptyGrid(this DataGridView _dgv)
Value Methods
int GetIntRef(this DataGridView _dgv, int _columnIndex)
int GetIntRef(this DataGridView _dgv, string _columnIndex)
long GetLongRef(this DataGridView _dgv, int _columnIndex)
long GetLongRef(this DataGridView _dgv, string _columnIndex)
byte GetByteRef(this DataGridView _dgv, int _columnIndex)
static byte GetByteRef(this DataGridView _dgv, string _columnIndex)
string GetStringRef(this DataGridView _dgv, int _columnIndex)
string GetStringRef(this DataGridView _dgv, string _columnIndex)
double GetDoubleRef(this DataGridView _dgv, int _columnIndex)
double GetDoubleRef(this DataGridView _dgv, string _columnIndex)
decimal GetDecimalRef(this DataGridView _dgv, string _columnIndex)
decimal GetDecimalRef(this DataGridView _dgv, int _columnIndex)
object GetValue(this DataGridView _dgv, string _columnIndex)
object GetValue(this DataGridView _dgv, int _columnIndex)
Gets value from a Data grid column/row
Presumes current row selected
Uses either name or index
Value methods from cells
object GetCellValue(this DataGridView _dgv, string _columnName, int _rowIndex)
Get a value from a specific named column/row
Total calculations
decimal GetDecimalColumnTotals(this DataGridView _dgv, string _columnName)
decimal GetDecimalColumnTotals(this DataGridView _dgv, int _columnName)
double GetDoubleColumnTotals(this DataGridView _dgv, string _columnName)
double GetDoubleColumnTotals(this DataGridView _dgv, int _columnName)
int GetIntColumnTotals(this DataGridView _dgv, string _columnName)
int GetIntColumnTotals(this DataGridView _dgv, int _columnName)
long GetLongColumnTotals(this DataGridView _dgv, string _columnName)
long GetLongColumnTotals(this DataGridView _dgv, int _columnName)
Returns totals of a named or index colum
Clear selection
void ClearGridSelection(this DataGridView _dgv)
Positioning
int NextGridRow(this DataGridView _dgv)
int PrevGridRow(this DataGridView _dgv)
int FirstGridRow(this DataGridView _dgv)
int LastGridRow(this DataGridView _dgv)
bool IsLastRow(this DataGridView _dgv)
bool IsFirstRow(this DataGridView _dgv)
bool IsMiddleRows(this DataGridView _dgv)
void MoveToRow(this DataGridView _dgv, int _position)
Move the selection to a specific row (zero based)
Enable/Disable edit columns
bool EnableEditColumns(this DataGridView _dgv, List<string> _writeColumns)
bool EnableEditColumns(this DataGridView _dgv, List<int> _writeColumns)
bool EnableEditColumns(this DataGridView _dgv, string _writeColumn)
bool EnableEditColumns(this DataGridView _dgv, int _writeColumn)
bool DisableEditColumns(this DataGridView _dgv, List<string> _readOnlyColumns)
bool DisableEditColumns(this DataGridView _dgv, List<int> _readOnlyColumns)
bool DisableEditColumns(this DataGridView _dgv, string _readOnlyColumn)
bool DisableEditColumns(this DataGridView _dgv, int _readOnlyColumn)
GUI Issues
void SetGridUI(Dictionary<string, Dictionary<string, object>> _dispColumns, DataGridView _dgv)
void SetGridUI(this DataGridView _dgv, Dictionary<string, Dictionary<string, object>> _dispColumns)
void SetColumnProperties(this DataGridViewColumn _column, Dictionary<string, object> _settings)
With SetGruidUI display colums is {Key (column name), value {attribute, value}}
With SetColumnProperties settings is {attribute, value}
Other Things
Nugget generated for .NET Framework 4.8.1 Code should work in NET Framework and .NET I haven't yet found out how to get a generic that will work everywhere the code will work so I will publish a version that works with .NET
Change Log
Version 1.2.0
Changed various methods into extentions
Added MoveToRow
Licensed under MIT Licence
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net481 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8.1
- 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.
Changed to Extensions