Default expansion problem example of RowExpander control in Extjs _ extjs

Source: Internet
Author: User
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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.