Posted 13 June 2018, 7:20 pm EST
Hi,
Thanks for evaluating Wijmo!
Currently, row detail do not have react module. Hence, the wijmo.grid.detail module should be imported as following:
import * as wjcGridDetail from 'wijmo.grid.detail';
After that you need to create an instance of FlexGridDetailProvider class and set its createDetailCell property to a function which takes a wijmo.grid.Row as input and returns a cell element(HTMLElement) for that row.
Please refer to following code snippet:
/* create instance of FlexGridDetailProvider class */
var dp = new wjcGridDetail.FlexGridDetailProvider(grid);
/* function that creates detail cell for row */
dp.createDetailCell = (row) => {
/* create detail cell */
var cell = document.createElement('div');
var detailGrid = new wjcGrid.FlexGrid(cell, {
headersVisibility: wjcGrid.HeadersVisibility.Column,
autoGenerateColumns: false,
itemsSource: this.getData(10),
isReadOnly: true,
columns: [
{ header: 'ID', binding: 'id' },
{ header: 'Country', binding: 'country' }
]
});
return cell;
};
You can also refer to the following sample in react:- https://stackblitz.com/edit/react-u1drlm?file=index.js
~Manish