Hi Team,
Recently i upgraded kendo version from 3 to 5.12 and and master detail grid which was working earlier in version 3 stoped working. Is there any change in latest version?.
Below is the code. getDetails() function is called from grid but DetailComponent is not getting called which is returning the child colums and data when masterGrid is true.
class customGrid extends PureComponent{
constructor(props){
Super(props)
}
renderGridColumn=(column)=>{
const gridColums ={}
gridColums.field = column.field;
gridColumn.title=column.title;
return <Column {...gridColumn}/>
}
onExpandChange=(event)=>{
let id = event.dataItem.id;
let data= this .state.data;
event.dataItem.expanded=event.value;
this.setState({
...this.state,
})
If(!event.value|| event.dataItem.details){
return
}
let index= data.findIndex((d)=> d.id === id);
data[index].details= data[index].result;
this.setState ({
data: data
})
}
DetailComponent=(props)=>{
const detailParam ={
data: props.dataItem[this.props.field],
gridColumn: this.props.columns
}
return this.props.onDetailRow(detailParam)
}
getDetails=()=>{
If(this.state.masterGrid){
return{detail:DetailComponent}
}
}
<Grid
{...this.getDetails()}
expandField="expanded"
onExpandChanhe={this.onExpandChange}
>
this.state.gridColumn.column.map((column))=>{
return this.renderGridColumn(column)
}
</Grid>
}