1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
<script type="text/javascript"> Ext.onReady(function() { Ext.BLANK_IMAGE_URL = 'blank.gif'; var genres = new Ext.data.SimpleStore( { fields: ['id', 'genre'], data: [ ['1', 'Comedy'], ['4', 'Drama'], ['3', 'Action'] ] }); var list1 = new Ext.list.ListView( { store: genres, width: 120, hideHeaders: true, selectedClass: 'x - list - selected', multiSelect: false, singleSelect: true, columns: [ { dataIndex: 'id', tpl: '<input type="checkbox" id="{id}"></input>', width: .2 }, { dataIndex: 'genre', tpl: '{genre}', width: .5 }] }); var myPanel = new Ext.Panel( { renderTo: Ext.get('div_formPanel'), layout: 'hbox', autoWidth: true, autoHeight: true, id: 'myP', autoScroll: true, items: [list1] }); }); </script> |