Apr 30, 2012, 1:20 PM
[CLOSED] [#88] How to expand/collapse a grid group in client side
Hello
In my first application version in Ext.NET 1.3 I have this code to toggle one of the group of my grids :
I found the expand and collapse method on the Ext.grid.feature.Grouping, but I didn't found how to get the feature from the grid (in fact I found this: myGrid.features[0] but I did not kow if this is the good object and can't call collapse or expand with it)
I start all my group collapsed and I want to expand the one chosen.
In the function, all works well, expet the toggleRowIndex (of course)
In my first application version in Ext.NET 1.3 I have this code to toggle one of the group of my grids :
var toggleGroupByValue = function ( gridName, groupValue )
{
var grid;
var store;
var view;
var groupField;
var index;
try
{
grid = Ext.getCmp( gridName );
store = grid.getStore();
view = grid.getView();
groupField = store.groupField;
store.each( function ( record, i )
{
if ( record.data[groupField] == groupValue )
{
index = i;
return false;
}
} );
grid.toggleRowIndex( index, true );
}
catch ( Error )
{
}
};
Problem is that this code didn't work since Ext.JS 4.0 because toggleRowIndex has disapeared.I found the expand and collapse method on the Ext.grid.feature.Grouping, but I didn't found how to get the feature from the grid (in fact I found this: myGrid.features[0] but I did not kow if this is the good object and can't call collapse or expand with it)
I start all my group collapsed and I want to expand the one chosen.
In the function, all works well, expet the toggleRowIndex (of course)
Last edited by Daniil; Jun 03, 2013 at 3:53 PM.
Reason: [CLOSED]