Skip to content

Commit 68ade56

Browse files
committed
Merge remote-tracking branch 'refs/remotes/IgniteUI/master'
2 parents 14d0521 + 25b1274 commit 68ade56

File tree

11 files changed

+231
-112
lines changed

11 files changed

+231
-112
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,42 @@ There are two mandatory attributes that need to be set to an Ignite UI control c
8686

8787
In this example `options` attribute points to `gridOptions` property on the application compoment class and `widgetId` points to the `id` property.
8888

89+
### Configuring Top Level Control Options
90+
91+
All top level options are allowed to be set as attributes of an Ignite UI control custom tag. In this case `options` attribute is not mandatory,
92+
but it is allowed. And if both - `options` and top-level attributes are combined, top-level attributes will override `options`,
93+
when there are overlapping properties. Also changing top-level attribute will apply the change to the widget, only if the option is settable.
94+
95+
#### Example:
96+
97+
@Component({
98+
selector: 'my-app',
99+
template: `<ig-grid
100+
[widgetId]='id'
101+
[width]='w'
102+
[autoCommit]='true'
103+
[dataSource]='data'
104+
[height]='h'
105+
[autoGenerateColumns]='true'
106+
>
107+
</ig-grid>`,
108+
directives: [IgGridComponent]
109+
})
110+
export class AppComponent {
111+
private id: string;
112+
private data: any;
113+
private w: string;
114+
private h: string;
115+
private pKey: string;
116+
117+
constructor() {
118+
this.data = Northwind.getData();
119+
this.id ='grid1';
120+
this.w = '100%';
121+
this.h = '400px';
122+
this.pKey = 'ProductID';
123+
}
124+
}
89125

90126
### Handling events
91127

index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,15 @@ <h2>Code...</h2>
201201

202202
<h2>Samples</h2>
203203
<div class="links">
204-
<a class="btn btn-default" href="samples/igGrid/igGrid.html">igGrid</a>
204+
<div class="btn-group">
205+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
206+
igGrid <span class="caret"></span>
207+
</button>
208+
<ul class="dropdown-menu" role="menu">
209+
<li><a href="samples/igGrid/igGrid.html">Default</a></li>
210+
<li><a href="samples/igGrid-TopLevelOpts/igGrid-TopLevelOpts.html">Top-level template options</a></li>
211+
</ul>
212+
</div>
205213
<a class="btn btn-default" href="samples/igHierarchicalGrid/igHierarchicalGrid.html">igHierarchicalGrid</a>
206214
<a class="btn btn-default" href="samples/igTreeGrid/igTreeGrid.html">igTreeGrid</a>
207215
<div class="btn-group">

0 commit comments

Comments
 (0)