User Tools

Site Tools


dev:eg-grid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:eg-grid [2024/04/05 11:54] – created slearydev:eg-grid [2025/03/04 12:42] (current) sleary
Line 1: Line 1:
 ====== Angular eg-grid component ====== ====== Angular eg-grid component ======
  
-TODO: explanation of flexbox vs. tables; see [[https://bugs.launchpad.net/evergreen/+bug/1615781|Bug #1615781]]+===== Setting up a new grid =====
  
-[[https://github.com/berick/Presentations/blob/main/Pending/newdevs.md#grid-cell-templates|Grid cell templates tutorial]]+  * Defining the persistKey and adding the workstation setting SQL for saving grid settings 
 +  * Choosing the data source and setting up ''GridDataSource.getRows()'' 
 +    * Fleshing linked fields 
 +      * Handling linked fields using CStore when PCRUD is not available (i.e. org unit settings) 
 +    * Joining tables via PCRUD ops 
 +    * Prepending data (see Acquisitions line item search) 
 +  * Filtering 
 +  * Sorting
  
-[[newdevs:code:grid-cell-text-generator|Grid cell text generator]]+==== Grid columns ====
  
-[[styling|Styles based on column names and data types (WIP)]]+  * Automatic columns from IDL fields 
 +  * Renaming columns 
 +  * Hiding IDL columns 
 +  * Defining grid cell templates and text generators for columns
  
 +==== Grid cells ====
  
 +  * [[dev:eg-grid:styling|Styles based on column names and data types (WIP)]]
 +  * [[https://github.com/berick/Presentations/blob/main/Pending/newdevs.md#grid-cell-templates|Grid cell templates tutorial]]
 +    * Note that ''(click)'' actions in grid cells' child buttons should call ''$event.preventDefault()'' and ''$event.stopPropagation'' to prevent the row selection event from firing
 +  * [[newdevs:code:grid-cell-text-generator|Grid cell text generator]] -- setting up print templates for custom grid cell templates that contain links and buttons
 +
 +==== Grid toolbar buttons, actions, and context menus ====
 +
 +  * Filters button (always leftmost)
 +  * Button colors and (TK) button style directive 
 +  * Template areas before and after each button (primarily for [[https://getbootstrap.com/docs/5.3/forms/input-group/|input groups]])
 +  * Grouping actions
 +    * Note that toolbar buttons could be grouped into dropdowns in AngularJS, but this has never been implemented in Angular
 +  * Right-click context menus
 +  * Double-click row actions
 +  * ''$event'' and ''context.getSelectedRows()''
 +  * Special instructions for file download buttons
 +
 +==== Grid filtered view links ====
 +
 +  * (new in 3.14) See ''.eg-grid-filter-links'' in ''staff/share/buckets/record-bucket.component.html'' and ''getViewKeys()'' in ''staff/share/buckets/record-bucket.component.ts''
 +  * Constructing URLs to filtered grid views
 +
 +===== AngularJS grids =====
 +
 +TODO: explanation of flexbox in AngularJS vs. tables in Angular; see [[https://bugs.launchpad.net/evergreen/+bug/1615781|Bug #1615781]]
dev/eg-grid.1712332477.txt.gz · Last modified: 2024/04/05 11:54 by sleary

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.