PDA

View Full Version : Customization of BoundList



ralfius
11 Dec 2012, 1:50 AM
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

ralfius
12 Dec 2012, 8:36 AM
Looks like I have found some kind of solution that allow to make BoundList rendering data in columns.
Example of xtemplate:


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