javascriptextjsextjs4extjs4.2extjs5

ExtJs: Best List component ? Grid is way too much functionality


I am trying to add a component to my window that has similar functionality to the grid but without all the selecting etc. It kind of seems overkill, I know you can disable grid selection etc but I was hoping for something similar.

Basically I have a store that has a field that contains a collection of text strings.

I would like to display the following info

    Text Item Name: bcdef
    Text Item Date:  25/04/2015

the name and date are in each record in the collection in the model. So I need to REPEAT over the above for 'n' number of records. I looked at the Dataview but it seems to support html templates not x-types.

Resulting screen would be something like so:

    Text Item Name: bcdef
    Text Item Date:  12/04/2015

    Text Item Name: jtjrt
    Text Item Date:  02/04/2015

    Text Item Name: bcrjtrtjrtdef
    Text Item Date:  04/04/2015

    Text Item Name: bcdef
    Text Item Date:  25/04/2015

How can I achieve this? The list doesn't need to be clickable, selectable or anything. It's just a list.


Solution

  • Why not use a simple panel with an XTemplate that loops through your records and writes the information you need. The result would be simple html, depending on how complex you make your template.

    XTemplate in docs

    You'd simply need to define the Xtemplate as the panel's tpl and update the panel with the records/store.

    If you find this helpful but need a bit more i may be able to provide a working sample later.

    Hope this helps