Home  >  Article  >  Web Front-end  >  Discussion on the default expansion problem of RowExpander control in Extjs_extjs

Discussion on the default expansion problem of RowExpander control in Extjs_extjs

WBOY
WBOYOriginal
2016-05-16 17:02:271223browse
Copy code The code is as follows:

//Expand rows that match a certain condition
function expendRow( )
{
var i;//Loop temporary variable
var arr = [];//Array of rows to be expanded
for(i=0;i{
var record = ProdRequireInfoStore.getAt(i);//Loop through each row

if(record.data.StatusID=='3 '){//If it meets my conditions, write it into 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 //The callback function expands the default row
});

This way when you This can be achieved when the gridpanel is opened, the default expansion of RowExpander
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn