Skip to content

Commit

Permalink
[update] grid/treegrid new and updated configs, configuration guides
Browse files Browse the repository at this point in the history
  • Loading branch information
mafanya23 committed Oct 16, 2023
1 parent a3220f9 commit 1aa2bdf
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 34 deletions.
2 changes: 1 addition & 1 deletion docs/form/api/container/api_container_properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ description: You can explore the Properties of the Container control of Form in

### Example

<iframe src="https://snippet.dhtmlx.com/bm1l4od5?mode=js" frameborder="0" class="snippet_iframe" width="100%" height="650"></iframe>
<iframe src="https://snippet.dhtmlx.com/cnxi9eqq?mode=js" frameborder="0" class="snippet_iframe" width="100%" height="650"></iframe>

**Related article:** [Container](form/container.md)
19 changes: 10 additions & 9 deletions docs/grid/api/grid_eventhandlers_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,27 @@ The **eventHandlers** object includes a set of *key:value* pairs, where:
</table>

@example:
const grid = new dhx.Grid("grid", {
const grid = new dhx.Grid("grid_container", {
columns: [
{ width: 200, id: "country", header: [{ text: "Country", css: "header_country" }] },
{ width: 150, id: "netChange", htmlEnable: true, header: [{text: "Net Change"}],
{ width: 150, id: "netChange", header: [{text: "Net Change"}],
// define a custom template for the column's cells
template: function (text, row, col) {
return "<div className='cell__template'><input type='checkbox' disabled " + (text +"/>"+ 3000000 ? "checked" : "") + " ></div>";
},
}
// more columns
return "<div className='cell__template'><input type='checkbox'
disabled " + (text /> 3000000 ? "checked" : "") + " ></div>";
}
},
htmlEnable: true,
// more options
],
data: dataset,
data: data,
// add event handler to the HTML element of the custom template of cells
eventHandlers: {
// add an event handler for the header cell
onclick: {
header_country: function(event, data) {
console.log(JSON.stringify(data.col, null, 2));
}
},
// add event handler to the HTML element of the custom template of cells
onmouseover: {
cell__template: function(event, data) {
console.log(JSON.stringify(data.row, null, 2));
Expand Down
6 changes: 3 additions & 3 deletions docs/grid/api/grid_footerautoheight_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const grid = new dhx.Grid("grid", {
footerAutoHeight: true // enable autoHeight in the footer
});

@descr: Redefines the <b>autoHeight</b> config for the footer.
@descr:

**Related sample**: [Grid. Header/Footer autoHeight mode](https://snippet.dhtmlx.com/jwz9k66d)

**Related sample**:

Redefines the <b>autoHeight</b> config for the footer.

@changelog: added in v8.3

Expand Down
5 changes: 3 additions & 2 deletions docs/grid/api/grid_headerautoheight_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ const grid = new dhx.Grid("grid", {
headerAutoHeight: true // enable autoHeight in the header
});

@descr: Redefines the <b>autoHeight</b> config for the header.
@descr:

**Related sample**:
**Related sample**: [Grid. Header/Footer autoHeight mode](https://snippet.dhtmlx.com/jwz9k66d)

Redefines the <b>autoHeight</b> config for the header.

@changelog: added in v8.3
7 changes: 2 additions & 5 deletions docs/grid/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,10 @@ const grid = new dhx.Grid("grid", {
columns: [
{ width: 200, id: "country", header: [
{
text: "<span style='font-size:16px; color: blue'>Country</span>",
htmlEnable: true
text: "<span style='font-size:16px; color: steelblue'>Country</span>",
htmlEnable: true,
}
]},
{ width: 150, id: "population", htmlEnable: true, header: [
{ text: "<span class='header-title'>Population</span>" }
]},
// other columns' configs
],
data: dataset,
Expand Down
6 changes: 4 additions & 2 deletions docs/treegrid/api/treegrid_footerautoheight_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ const treegrid = new dhx.TreeGrid("treegrid_container", {
footerAutoHeight: true // enable autoHeight in the footer
});

@descr: Redefines the <b>autoHeight</b> config for the footer.
@descr:

**Related sample**:
**Related sample**: [TreeGrid. Header/Footer autoHeight mode](https://snippet.dhtmlx.com/7kgj0b4e)

Redefines the <b>autoHeight</b> config for the footer.

@changelog: added in v8.3

Expand Down
5 changes: 3 additions & 2 deletions docs/treegrid/api/treegrid_headerautoheight_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ const treegrid = new dhx.TreeGrid("treegrid_container", {
footerAutoHeight: true // enable autoHeight in the footer
});

@descr: Redefines the <b>autoHeight</b> config for the header.
@descr:

**Related sample**:
**Related sample**: [TreeGrid. Header/Footer autoHeight mode](https://snippet.dhtmlx.com/7kgj0b4e)

Redefines the <b>autoHeight</b> config for the header.

@changelog: added in v8.3
10 changes: 0 additions & 10 deletions docs/treegrid/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,6 @@ const treeGrid = new dhx.TreeGrid("treegrid", {
],
gravity: 1.5,
},
{
id: "price",
type: "string",
htmlEnable: true,
header: [
{ text: "<span class='header-title'>Terms and conditions</span>", colspan: 2 },
{ text: "Price" }
]
},
// other columns' config
],
data: dataset,
Expand All @@ -463,7 +454,6 @@ const treeGrid = new dhx.TreeGrid("treegrid", {

**Related sample**: [TreeGrid. Styling header cells (custom CSS)](https://snippet.dhtmlx.com/vf0ws454)


### Event handlers for HTML content

#### HTML elements defined in the data set
Expand Down

0 comments on commit 1aa2bdf

Please sign in to comment.