Results 1 to 2 of 2

Thread: Passing index to List template

  1. #1

    Default Passing index to List template

    I wonder how List Template could get and use index for data store element. Let say "rest" request responds with 100 items and UI requires to put a sequential number. I do not want to have index as a part of a model. Is there a way to get entry index within a list template ?
    Appreciate if anyone could shed a light on that.

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Central Ohio


    Ext.dataview.List has a prepareData() method that can be overridden to pass more data to the template rendering each item. Here's an example:

    Tristan Lee
    Sencha Inc - Sustaining Engineer

    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

Similar Threads

  1. Change index.html build template
    By chris-mac in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 6 Oct 2015, 1:45 AM
  2. [CLOSED] Ext.mixin.Selectable cannot deselect by passing in an index
    By in forum Sencha Touch 2.x: Bugs
    Replies: 2
    Last Post: 16 Jan 2012, 2:40 PM
  3. [FIXED] dataview doselect does not work when passing selected index
    By clarose in forum Sencha Touch 2.x: Bugs
    Replies: 1
    Last Post: 21 Dec 2011, 2:52 PM
  4. How do i access index.js from a html template?
    By toot1981 in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 17 Jan 2011, 4:47 AM
  5. Ext.View index in template
    By bowa in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 17 Oct 2007, 12:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts