1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Ukraine
    Posts
    23
    Answers
    2
    Vote Rating
    0
    ralfius is on a distinguished road

      0  

    Default Unanswered: Customization of BoundList

    Unanswered: Customization of BoundList


    Hello,
    is there possibility to make some kind of grid structure using XTemplates? For example, I need to show multiple data in my BoundList inside combobox. Can I just make such a tpl property to render data like in grid?

    Thanks

  2. #2
    Sencha User
    Join Date
    May 2012
    Location
    Ukraine
    Posts
    23
    Answers
    2
    Vote Rating
    0
    ralfius is on a distinguished road

      0  

    Default


    Looks like I have found some kind of solution that allow to make BoundList rendering data in columns.
    Example of xtemplate:
    Code:
    myCombobox.tpl = new Ext.XTemplate('<table class="x-grid-table" width="100%" >',
        '<tr class="x-grid-row">',
            '<th><div class="x-column-header x-column-header-inner">' + column1Name + '</div></th>',
            '<th><div class="x-column-header x-column-header-inner">' + column2Name + '</div></th>',
        '</tr>',
        '<tpl for=".">',
            '<tr class="x-boundlist-item">',
                '<td><div class="x-grid-cell x-grid-cell-inner">{' + property1Name + '}</div></td>',
                '<td><div class="x-grid-cell x-grid-cell-inner">{' + property2Name + '}</div></td>',
            '</tr>',
        '</tpl>',
    '</table>');
    Unfortunately such 'fake grid' doesn't allow column headers to stay when BoundList is scrolled down and up. Also, there is no grid's column sorting.
    Any suggestions and recommendations about this code is desirable