Results 1 to 4 of 4

Thread: Better view for a list/dataview ?

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    Rennes - France
    Posts
    172
    Answers
    2
    Vote Rating
    1
      0  

    Default Better view for a list/dataview ?

    Hi,

    I have a list and i wonder if it is possible to transform it with a better rendering.

    I mean provide a look style as a spreadsheet with columns well separated and a top row that display the title's colum.

    I am looking also for displaying pictures in some cells.

    I have checked if a dataview can be used but the look and feel is not the one expected.

    Thanks in advance for your reply.

    Regards

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Answers
    6
    Vote Rating
    2
      0  

    Default You will need a custom class

    A custom class will let you define your own html, I'm quite new here but here is a link that will help

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Location
    Rennes - France
    Posts
    172
    Answers
    2
    Vote Rating
    1
      0  

    Default

    where is your link ?

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Answers
    6
    Vote Rating
    2
      0  

    Default

    http://www.sencha.com/learn/sencha-touch-2-class-system/

    s
    orry more concise

    http://docs.sencha.com/touch/1-1/#!/api/Ext.XTemplate

    h
    ere is some example code that gives you the IDEA only as it doesnt work but look at the itemTpl part here you set your html and it gets populated in a loop for each element

    Ext.define('Ap.view.markets.Olist', {
    extend: 'Ext.List',
    xtype:'olist'
    });


    Ext.create('Ext.List', {
    fullscreen: true,
    store: {
    fields: ['name'],
    data: [
    {name: 'Cowper'},
    {name: 'Everett'},
    {name: 'University'},
    {name: 'Forest'}
    ]
    },


    itemTpl: '{name}',


    listeners: {
    select: function(view, record) {
    Ext.Msg.alert('Selected!', 'You selected ' + record.get('name'));
    }
    }
    });

Posting Permissions

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