All Projects → sontx → simple-datagridview-paging

sontx / simple-datagridview-paging

Licence: MIT license
A simple UserControl that shows the data-table and paging automatically with .Net Framework

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to simple-datagridview-paging

X.pagedlist
Library for easily paging through any IEnumerable/IQueryable in ASP.NET/ASP.NET Core
Stars: ✭ 625 (+2617.39%)
Mutual labels:  pagination, nuget
paginater
Package paginater is a helper module for custom pagination calculation.
Stars: ✭ 45 (+95.65%)
Mutual labels:  pagination
Standard-Toolkit
An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET Core/.NET
Stars: ✭ 194 (+743.48%)
Mutual labels:  nuget
Ubiety.Xmpp.Core
XMPP library for .NET Core
Stars: ✭ 32 (+39.13%)
Mutual labels:  nuget
GW2.NET
A user friendly wrapper around the official GW2 API
Stars: ✭ 18 (-21.74%)
Mutual labels:  nuget
Bing-Maps-V8-TypeScript-Definitions
This project contains the TypeScript definitions for the Bing Maps V8 Web Control.
Stars: ✭ 36 (+56.52%)
Mutual labels:  nuget
SwiftyUIScrollView
A custom ScrollView wrapper that comes with Pagination and Page Control.
Stars: ✭ 18 (-21.74%)
Mutual labels:  pagination
YaccLexTools
This package includes GPPG and GPLEX tools for compiling YACC and LEX source files in your C# project.
Stars: ✭ 16 (-30.43%)
Mutual labels:  nuget
lampager-laravel
Rapid pagination for Laravel
Stars: ✭ 71 (+208.7%)
Mutual labels:  pagination
jekyll-pagination
Better pagination for Jekyll.
Stars: ✭ 19 (-17.39%)
Mutual labels:  pagination
QueryMovies
This repository shows a Android project with Clean Architecture, Functional Reactive Programming and MVP+Dagger
Stars: ✭ 16 (-30.43%)
Mutual labels:  pagination
paket-lock-diff
This is a tool to analyze two paket.lock files showing additions, removals, upgrades and downgrades.
Stars: ✭ 16 (-30.43%)
Mutual labels:  nuget
HashDepot
.NET library for xxHash, FNV, MurmurHash3 and SipHash algorithms
Stars: ✭ 107 (+365.22%)
Mutual labels:  nuget
net-EmailAddress
Multiple implementations on email address validation.
Stars: ✭ 12 (-47.83%)
Mutual labels:  nuget
AdvancedList-SwiftUI
MOVED to https://github.com/crelies/AdvancedList | Advanced list with empty, error and loading state implemented with SwiftUI
Stars: ✭ 41 (+78.26%)
Mutual labels:  pagination
Translit
C# library for cyrillic-latin transliteration (support only slavik languages) by GOST 7.79-2000 (ISO 9).
Stars: ✭ 47 (+104.35%)
Mutual labels:  nuget
discord-paginationembed
A pagination utility for MessageEmbed in Discord.JS
Stars: ✭ 93 (+304.35%)
Mutual labels:  pagination
paginathing
a jQuery plugin to paginate your DOM easily.
Stars: ✭ 23 (+0%)
Mutual labels:  pagination
Pagination
a paging widget based on Qt
Stars: ✭ 22 (-4.35%)
Mutual labels:  pagination
pagination
Пример создания пагинации в Vue.js
Stars: ✭ 31 (+34.78%)
Mutual labels:  pagination

NuGet

simple-datagridview-paging is a simple UserControl that shows the data-table and paging automatically. With this library, you can also edit the data and it will be saved to the database automatically.

Only ONE line:

dataGridViewPaging.DbRequestHandler = DbRequestHandlerHelper.Create(new SQLiteConnection("Data Source=chinook.db"), "tracks");

Installation

Nuget:

Install-Package SimpleDataGridViewPaging

Or download binary file.

Usage

  1. Add the libary to the ToolBox: Right click to ToolBox -> Choose Item... -> In .Net Framework Components, click on Browse... and select the SimpleDataGridViewPaging.dll file then click OK.
  2. The DataGridViewPaging will be shown in the ToolBox like this:
  3. Drop&drag this control into your form.
  4. Code:
dataGridViewPaging.DbRequestHandler = DbRequestHandlerHelper.Create(new SQLiteConnection("Data Source=chinook.db"), "tracks");

There are two parameters: the connection and the table name that will be shown in the control.

  1. Enjoy ;)

More Options

There are several custom levels:

  1. Read-only mode:
// The first parameter is the database connection,
// the second one is the table name the will be queried and shown in the control.
dataGridViewPaging.DbRequestHandler = DbRequestHandlerHelper.Create(
    new SQLiteConnection("Data Source=chinook.db"),
    "tracks");
  1. Editable mode:
// Like the readonly mode but the third parameter is the CommandBuilder object. 
dataGridViewPaging.DbRequestHandler = DbRequestHandlerHelper.Create(
    new SQLiteConnection("Data Source=chinook.db"),
    "tracks",
    new SQLiteCommandBuilder(new SQLiteDataAdapter()));
  1. Custom query text:
// The libary will use this statement to query the number of records
// that need to caculate the pagination info.
var countStatementBuilder = new CountStatementBuilder();
countStatementBuilder.CommandText("SELECT COUNT(*) FROM tracks");

// This statement will be used to query the actually data of the table.
// There are 3 placeholders: {0} - table name, {1} - max records, {2} - page offset.
// The libary will pass corresponding data to these placeholders on demand.
var rowsStatementBuilder = new RowsStatementBuilder();
rowsStatementBuilder.CommandText("SELECT * FROM tracks LIMIT {1} OFFSET {2}");

dataGridViewPaging1.DbRequestHandler = new DbRequestHandler
{
    Connection = new SQLiteConnection("Data Source=chinook.db"),
    CountStatementBuilder = countStatementBuilder,
    RowsStatementBuilder = rowsStatementBuilder
};
  1. Manual querying. Take a look

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Dependencies

  • .Net Framework 4.5 or later.

Author

Developed by sontx/noem, some useful information:

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].