Обычно у меня есть родительская сетка с расширителем строк, когда мы расширяем каждую строку, она также показывает дочернюю сетку с расширителем строк.
Я понял, что когда я нажимаю на расширитель во вложенной сетке, он получает запись из родительской строки вместо своих собственных данных.
Что приводит к другим ошибкам при отображении расширенного содержимого тела.
Что я делаю не так в своем коде?
buildNestedGrid: function (ruleId) {
var nestedExpander = new Ext.ux.grid.RowExpander({
id: 'nestedExpander',
tpl: new Ext.Template(
'<div id="childRulesGrid"></div>',
{
compiled: true,
disableFormats: true
}
)
});
//build grid
var nestedGrid = new Ext.grid.GridPanel({
id: 'childRuleGrid',
store: this.buildStoreForChildRules(ruleId),
height: 150,
hideHeaders: true,
columns: [
nestedExpander,
{
id: 'id',
header: 'Id',
dataIndex: 'Id'
},
{
id: 'parentId',
header: 'Parent Id',
dataIndex: 'ParentId'
},
{
id: 'condition',
header: 'Condition',
dataIndex: 'Condition'
},
{
id: 'conclusion',
header: 'Conclusion',
dataIndex: 'Conclusion'
},
{
id: 'createdBy',
header: 'Created By',
dataIndex: 'CreatedBy'
},
{
id: 'createdOn',
header: 'Created On',
dataIndex: 'CreatedOn'
}
],
viewConfig: {
forceFit: true
}
});
nestedGrid.render('childRulesGrid');
}