File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,13 +73,13 @@ For Grid (in the TreeGrid mode) or Tree used in a sub-row it is important to spe
7373For example:
7474
7575~~~ jsx {8,16}
76- grid = new dhx.Grid (" grid_container" , {
76+ const grid = new dhx.Grid (" grid_container" , {
7777 columns: [
7878 // columns config
7979 ],
80- data: dataset,
81- subRow : (row ) => {
82- subGrid = new dhx.Grid (null , {
80+ data: dataset,
81+ subRow : (row ) => (
82+ new dhx.Grid (null , {
8383 rootParent: " root" , // Add the root id
8484 columns: [
8585 { id: " country" , header: [{ text: " Country" }] },
@@ -89,10 +89,9 @@ grid = new dhx.Grid("grid_container", {
8989 data: row .data ,
9090 autoWidth: true ,
9191 type: " tree" ,
92- });
93- return subGrid;
94- },
95- });
92+ })
93+ ),
94+ });
9695~~~
9796
9897** Related sample:** [ Grid. Row expander. Full config] ( https://snippet.dhtmlx.com/xdw2037t )
Original file line number Diff line number Diff line change @@ -2226,13 +2226,13 @@ For Grid (in the TreeGrid mode) or Tree used in a sub-row it is important to spe
22262226For example:
22272227
22282228~~~ jsx {8 ,16 }
2229- grid = new dhx.Grid (" grid_container" , {
2229+ const grid = new dhx.Grid (" grid_container" , {
22302230 columns: [
22312231 // columns config
22322232 ],
2233- data: dataset,
2234- subRow : (row ) => {
2235- subGrid = new dhx.Grid (null , {
2233+ data: dataset,
2234+ subRow : (row ) => (
2235+ new dhx.Grid (null , {
22362236 rootParent: " root" , // Add the root id
22372237 columns: [
22382238 { id: " country" , header: [{ text: " Country" }] },
@@ -2242,10 +2242,9 @@ grid = new dhx.Grid("grid_container", {
22422242 data: row .data ,
22432243 autoWidth: true ,
22442244 type: " tree" ,
2245- });
2246- return subGrid;
2247- },
2248- });
2245+ })
2246+ ),
2247+ });
22492248~~~
22502249
22512250### Adjusting configuration of sub- rows
You can’t perform that action at this time.
0 commit comments