This article discusses the default expansion of the RowExpander control in Extjs. The following is a good example. If you are interested, refer
The Code is as follows:
// Expand the row that meets a condition
Function expendRow ()
{
Var I; // temporary variable for Loop
Var arr = []; // array of rows to be expanded
For (I = 0; I {
Var record = ProdRequireInfoStore. getAt (I); // traverse each row cyclically
If (record. data. StatusID = '3') {// if my conditions are met, write the data to the array.
Arr. push (I );
}
}
For (var j = 0; jexpander. toggleRow (arr [j]);
}
}
// Call the callback function to expand the default row when the data source is loaded.
ProdRequireInfoStore. load ({
Params :{
Dir: 'desc ',
Start: 0,
Limit: 20,
KeyWord :''
},
Callback: expendRow // callback function expansion default row
});
In this way, you can enable gridpanel and expand RowExpander by default.