In SmartClient 8, when using a ListGrid with the expansionMode set to ‘details’, how do you make the rows automatically expand? I’ve searched through the documentation, examples and forums, but haven’t yet found the way to do this.
If you could point me to the part in the docs that detail this, I would appreciate it.
Still hoping that someone can provide a clue on how to do this. Given the number of views that this topic has (as well as previous versions that also went unanswered) there definitely seems to be some interest.
If you’re talking about having all records initially expanded, this has been answered several times: don’t do this via expanding records, do it via recordComponents. That’s the only way it’s going to handle large numbers of records (pooling - see docs).
I take your point about using a recordComponent and I know about the expandRecord() method. However, I have not been able to find programmatic examples of their use or even some explanation of how to structure my code to handle a ListGrid’s lifecycle. The documentation and sample apps do a fine job of showing how to get started with a component but not, in this case, how to interact with it. As for having answered this question several times, it’s worth pointing out that while the expandRecord() method has been referenced, its implementation has not.
For what it’s worth, my data set is 0-3 records, although being able to recycle components is definitely something that I am interested learning more about.
Is there an example of how to do more advanced manipulation of a ListGrid?
Is there documentation other than the Quick Start guide and online documentation that gets into this a little deeper?
Am I just looking in the wrong place?
I’m more than happy to RTFM. Prefer to, actually. I’m just not sure that I’m R’ing the right FM.
I’ll make a deal with you, Iso (may I call you “Iso”?). Help me figure this out and I’ll post a working example here so that others can learn from it. This way, I get the answer that I’m looking for and you don’t have to be bothered with being asked the question again. And, again, this is for SmartClient, not SmartGWT.
Well, there’s an example of using recordComponents here and the docs for the showRecordComponents setting provides an overview and links to all the other properties you can set related to recordComponents.
There’s currently not a separate example of having records per row instead of per-cell, although that’s simpler and is the default. Regardless, if you wanted to contribute some well-crafted samples showing the pooling behavior, or different variations of recordComponentPosition, that would be appreciated and we’d put them right in the Showcase.
Isomorphic, thanks for your point.
According to the example you mentioned, if I set setShowRecordComponents to true, this listGrid will call createRecordComponent() to create and show the embedded component in every row.
What if I create a nested grid via getExpansionComponent() like this Nested Grid , is there a corresponding method having all records(nested grids) initially expanded?