PHPackages                             fsi/datagrid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fsi/datagrid

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fsi/datagrid
============

FSi DataGrid Component

2.1.0(5y ago)2762.7k↓50.8%12[4 issues](https://github.com/fsi-open/datagrid/issues)[1 PRs](https://github.com/fsi-open/datagrid/pulls)2MITPHPPHP ^7.1|^8.0CI failing

Since Dec 30Pushed 5y ago5 watchersCompare

[ Source](https://github.com/fsi-open/datagrid)[ Packagist](https://packagist.org/packages/fsi/datagrid)[ RSS](/packages/fsi-datagrid/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (11)Versions (32)Used By (2)

FSi DataGrid Component
======================

[](#fsi-datagrid-component)

List component that displays the items from collection (data source) by using special column objects. Displaying objects list is one of the most common tasks in web applications and probably the easiest one, so you could ask how this component can help you?

FSi DataGrid Component allows you to create one action that handle display all kind of lists in your application without duplicating code. It can be very useful in all kind of admin panel generators.

Basic Usage
-----------

[](#basic-usage)

The sample code shows more than a thousand words so lets start!

Before you can display data you need to add columns into DataGrid component. Columns pull data from objects using `DataMappers` (They will be described later).

Imagine a situation where we need to display a list of news. List must contains such information as:

- News ID
- News Title
- Author Name, Surname and email
- Publication Date
- Some basic actions like edit and delete

So we should get a table similar to the following:

IdNews titleAuthorPublication dateActions1First NewsNorbert Orzechowicz 2012.05.01 15:13:52*Edit Delete*2Second NewsNorbert Orzechowicz 2012.05.06 15:13:52*Edit Delete*And here is our News object.

```
