Results 1 to 6 of 6

Thread: Component making - howto

  1. #1
    Touch Premium Member
    Join Date
    Jul 2011
    Location
    Poland
    Posts
    63
    Answers
    1
    Vote Rating
    4
      0  

    Default Component making - howto

    Hello,

    I'm looking for some kind of know-how information how to create component. In my case I have a custom grid renderer, it's responsible for generating html. In nearest future I would like to have ability to make this dragable, also access to model object (related to cell/grid column), some html mangament in one place (component, plugin?), which option is best? Some hints, ideas and examples are extremely welcome.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997
    Vote Rating
    1524
      0  

    Default

    If you want the grid and all the goodies that comes along with it... use a grid. You also have Ext.view.View (DataView) that can use a store and render HTML just no controls to click to sort and such.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Touch Premium Member
    Join Date
    Jul 2011
    Location
    Poland
    Posts
    63
    Answers
    1
    Vote Rating
    4
      0  

    Default

    I was little unclear sorry, I already have a Ext.grid.Panel and custom cell renderer. Currently renderer generate html to paint in grid cell, but I'm thinking of some component/plugin (?) to manage that and have a chance to bind events like click etc on that generated html and be able to drag and drop this later. Thats why I'm looking for some more knowledge.

  4. #4
    Touch Premium Member
    Join Date
    Jul 2011
    Location
    Poland
    Posts
    63
    Answers
    1
    Vote Rating
    4
      0  

    Default

    In short, the record rendered in the cell has many elements in hasMany relationships, my custom render handle the rendering this elements, but I need to handle dbclick on this elements and other operations like opening edit window for record. Could you give me some snippets how to render data using "dataview" into grid cell and attache event handling?
    Ext.ux.plugin.field.date.KeyboardUser keyboard helper for datefields

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    492
    Answers
    12
    Vote Rating
    2
      0  

    Default

    Quote Originally Posted by michall View Post
    In short, the record rendered in the cell has many elements in hasMany relationships, my custom render handle the rendering this elements, but I need to handle dbclick on this elements and other operations like opening edit window for record. Could you give me some snippets how to render data using "dataview" into grid cell and attache event handling?
    If I understand you correctly, this might be of some help:

    Code:
    var gridElement = yourGrid.getEl();
    gridElement.on('click', function(event) {
        // Execute whatever function you need to
    }, gridElement, {
        delegate: '.classname-of-the-element-you-need-the-event-attached-to'
    });
    Hope that helps.

  6. #6
    Touch Premium Member
    Join Date
    Jul 2011
    Location
    Poland
    Posts
    63
    Answers
    1
    Vote Rating
    4
      0  

    Default

    Thanks abcdef for Your reply, funny but I have done that just before You post this ;-)
    Ext.ux.plugin.field.date.KeyboardUser keyboard helper for datefields

Posting Permissions

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