Results 1 to 2 of 2

Thread: Ext.dataview.component.DataItem

  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    45
    Vote Rating
    0
      0  

    Default Ext.dataview.component.DataItem

    Hi Everyone,

    I created a list based on Ext.dataview.DataView component, and the item is based on Ext.dataview.component.DataItem.


    I referred to this http://www.sencha.com/blog/dive-into...ouch-2-beta-2/ blog.
    Thanks for that. But on my case, How do I add two the same component in each list item.


    For example, each list has two buttons named delete and edit.

    Kindly help me please, any Idea and suggestion will be appreciated.


    Thanks!

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    In your dataMap you should be able to name them two different things

    Code:
    dataMap : {
        ...
        getDeleteButton : {
            setText : 'Delete'
        },
        getEditButton : {
            setText : 'Edit'
        }
    }
    And then do the apply/update methods.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

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