Skip to content

Commit d7fe72c

Browse files
Portugal, Marcelomportuga
authored andcommitted
docs(499_FAQ.ngdoc): Fixing minor issues with the FAQ.
fix #5477
1 parent 31e9060 commit d7fe72c

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

misc/tutorial/499_FAQ.ngdoc

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44

55
There are a number of common gotchas in using the grid, this FAQ aims to cover most of them in an easy to use format.
66

7-
### My fonts are all "chinese"?
7+
# My fonts are all "chinese"?
88

99
Refer to {@link 116_fonts_and_installation 116 Fonts and Installation}. The characters are apparently Korean,
1010
and in short, it means your fonts aren't installed properly.
1111

12-
### One of my columns hasn't turned up?
12+
# One of my columns hasn't turned up?
1313

1414
Your column names must be unique - have you given two columns the same name? If you want the same `displayName` you can
1515
do this, and you can have two columns refer to the same `field`, but each column must have a unique name.
1616

17-
### How do I get my grid to be responsive / take the full page height / automatically set height / when I use ng-show things go bad?
17+
# How do I get my grid to be responsive / take the full page height / automatically set height / when I use ng-show things go bad?
1818

1919
Refer to {@link 108_hidden_grids 108 Hidden Grids}. The short answer is the grid doesn't know how high it's content is until
2020
it renders, and it doesn't dynamically resize. You need to give an explicit height or an explicit number of rows to render.
2121

22-
### How can I show a sequence number/id in a column in my grid?
22+
# How can I show a sequence number/id in a column in my grid?
2323

2424
The question here is what you're really trying to achieve. Do you want the actual row index, or that you want to display a sequential
2525
id in all your rows?
2626

2727
If the latter, then you can do it by just adding a counter column to your data:
2828

2929
```
30-
$scope.myData.forEach( function( row, index){
30+
$scope.myData.forEach(function(row, index){
3131
row.sequence = index;
3232
});
3333
```
3434

3535
If you want to show the index of the row within the grid internals, then it depends on which internal you want. You can get
3636
the index of the row within grid.rows, which would show the row as it stands in the original rows list (not filtered nor sorted),
3737
or the index of the row within grid.renderContainers.body.visibleRowCache (filtered and sorted), or the render index of the
38-
row within the currently displayed rows (given virtualisation, this is generally a particularly useless number).
38+
row within the currently displayed rows (given virtualization, this is generally a particularly useless number).
3939

4040
If you're OK that whenever someone sorts or filters then the numbers will change, then you could do it with a cellTemplate,
4141
which would be something like:
@@ -44,26 +44,28 @@ There are a number of common gotchas in using the grid, this FAQ aims to cover m
4444
cellTemplate: '<div class="ui-grid-cell-contents">{{grid.renderContainers.body.visibleRowCache.indexOf(row)}}</div>'
4545
```
4646

47-
### What browsers are supported by ui.grid
47+
# What browsers are supported by ui.grid
4848

49-
Our current testing verifies against IE9+, Chrome, Firefox, Safari 5+, Opera and Android. We expect that the functionality
49+
Our current testing verifies against IE9+, Edge, Chrome, Firefox, and Safari 7+. We expect that the functionality
5050
is compatible with any HTML5 compliant and Javascript enabled browser. Refer {@link 100_preReqs preReqs}. Note that IE9
5151
compatibility is marginal - the base functions all work but performance is poor in some cases, and some behaviour is not
5252
as desired. We have limited ability to control some of this, but have decided to retain IE9 in the supported list due to
5353
the small number of organisations for whom this is critical. If using on IE9 we recommend testing your specific use cases
5454
to verify all your desired functions work adequately.
5555

56-
## What angular versions are supported by ui.grid
56+
# What angular versions are supported by ui.grid
5757

58-
Our current testing uses angular 1.6. We intend to remain compatible with all forward versions of 1.6.
58+
Our current testing uses angular 1.4 - 1.6. We intend to remain compatible with all forward versions of 1.6.
5959
Refer {@link 100_preReqs preReqs}
6060

61-
## How can I wrap text in a cell?
61+
# How can I wrap text in a cell?
6262
Refer also http://stackoverflow.com/questions/29298968/increase-width-of-column-in-ui-grid
6363

64-
Firstly, to set the column width you need to use column definitions, then you can set a width in pixels or percentage on each. Refer http://ui-grid.info/docs/#/tutorial/201_editable as an example that has column widths.
64+
Firstly, to set the column width you need to use column definitions, then you can set a width in pixels or percentage on each. Refer {@link
65+
201_editable 201 Editable} as an example that has column widths.
6566

66-
Secondly, there is the ability to add tooltips, which are one way to show longer cells that don't fit in the space available. Refer http://ui-grid.info/docs/#/tutorial/117_tooltips
67+
Secondly, there is the ability to add tooltips, which are one way to show longer cells that don't fit in the space available. {@link 117_tooltips
68+
117 Tooltips}
6769

6870
Thirdly, you can make the rows taller and therefore have space to wrap content within them. Be aware that all rows must be the same height, so you can't make only the rows that need it taller.
6971

@@ -73,7 +75,7 @@ There are a number of common gotchas in using the grid, this FAQ aims to cover m
7375

7476
A plunker as an example: http://plnkr.co/edit/kyhRm08ZtIKYspDqgyRa?p=preview
7577

76-
### How can I create a single central filter box similar to that available in ng-grid 2.x?
78+
# How can I create a single central filter box similar to that available in ng-grid 2.x?
7779

7880
In general ui-grid implements filters on a per-column basis, similar to how Excel implements them. The
7981
filter is evaluated column by column, allowing a value to match in one of a list of columns implies an

0 commit comments

Comments
 (0)