# j-TableGrid

> The component makes a simple table grid (composed of div elements) divided by a simple border that you can modify.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 8d85554e3ce4c5447c8a4dbd54836e8e59fa42799b0d4a6b034a7d721cc0a34d
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

The component makes a simple table grid (composed of `div` elements) divided by a simple border that you can modify.


__Configuration__:

- `count {Number}` a default count of items per row
- `countxs {Number}` items per row for mobile display
- `countsm {Number}` items per row for small display
- `countmd {Number}` items per row for medium display
- `countlg {Number}` items per row for a large display
- `parent {String}` for obtaining size (default: `window`)
- `margin {Number}` a vertical margin (default: `0`)
- `scrollbar {Boolean}` enables custom scrollbar (default: `false`)
- `fill {Boolean}` fills the grid with empty rowsm need to define `row` and `scrollbar`
- `row {Number}` a default row height for all displays (default: `0`)
- `rowxs {Number}` a default row height for mobile display (default: `0`)
- `rowsm {Number}` a default row height for small display (default: `0`)
- `rowmd {Number}` a default row height for medium display (default: `0`)
- `rowlg {Number}` a default row height for large display (default: `0`)
- `scrolltop {Boolean}` scrolls to the top after change data (default: `true`)


__Classes__:

- `ui-tablegrid-bl` means border-left
- `ui-tablegrid-bt` means border-top
- `ui-tablegrid-first` first item in the row
- `ui-tablegrid-last` last item in the row
- `ui-tablegrid-empty` empty item

Use it with `<ui-component name="tablegrid">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<div style="width:500px;padding:10px">
	<ui-component name="tablegrid" path="items" config="count:3" style="border:1px solid #EBECF2">
		<script type="text/html">
			<div style="padding:20px 0;text-align:center">{{ value.name }}</div>
		</script>
		<script type="text/html">
			<div style="padding:20px 0;text-align:center" class="b">Optional: empty</div>
		</script>
	</ui-component>
</div>
<script>
	var items = [{ name: 'Total.js' }, { name: 'SuperAdmin' }, { name: 'Code Editor' }, { name: 'jComponent' }];
</script>
```
