Не отображаются Таблицы Ext.Grid.
Здравствуйте.
У меня проблема с гридами. Сами таблицы не отображаются: ни Ext.Grid, ни Ext.EditorGridPanel. Использую простейшие примеры из Документации к Эксту: var title_edit = new Ext.form.TextField(); var director_edit = new Ext.form.TextField({vtype: 'name'}); var tagline_edit = new Ext.form.TextField({ maxLength: 45 }); var grid = new Ext.grid.EditorGridPanel({ renderTo: document.body, frame:true, title: 'Movie Database', height:200, width:520, clickstoEdit: 1, store: store, columns: [ {header: "Title", dataIndex: 'title', editor: title_edit}, {header: "Director", dataIndex: 'director', editor: director_edit}, {header: "Released", dataIndex: 'released', renderer: Ext.util.Format.dateRenderer('m/d/Y')}, {header: "Genre", dataIndex: 'genre', renderer: genre_name}, {header: "Tagline", dataIndex: 'tagline', editor: tagline_edit} ] }); var grid = new Ext.grid.GridPanel({ store: new Ext.data.Store({ reader: reader, data: xg.dummyData }), columns: [ {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'}, {header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, {header: "Change", width: 120, sortable: true, dataIndex: 'change'}, {header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'}, {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ], viewConfig: { forceFit: true }, sm: new Ext.grid.RowSelectionModel({singleSelect:true}), width:600, height:300, frame:true, title:'Framed with Checkbox Selection and Horizontal Scrolling', iconCls:'icon-grid' }); В итоге показывает пустую страницу.. Помогите. В чем дело? P.S. Примеры с Ext.Toolbar'ами отображаются... Все библиотеки подключены.. |
Сделал с нуля Грид. Получился. Код:
Ext.onReady(function(){ var myGrid = new Ext.grid.EditorGridPanel({ renderTo: document.body, columns:[ {header: 'Name', width: 200, sortable: true, dataIndex: 'name_ab'}, {header: 'Color', width: 150, sortable: true, dataIndex: 'color_ab'}, {header: 'Height', width: 150, sortable: true, dataIndex: 'height_ab'}, {header: 'Weight', width: 150, sortable: true, dataIndex: 'weight_ab'} ], frame: true, width: 600, height: 300, }) }) Но в файрфоксе почему то теперь 2 тулбара грида, а в эксплорере вообще - 0. ?? |
Теперь пытаюсь заполнить таблицу данными, как в учебнике (пока массив).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <link rel='stylesheet' type='text/css' href='lib/ext/resources/css/ext-all.css'> <script type='text/javascript' src='lib/ext/adapter/ext/ext-base.js'> </script> <script type='text/javascript' src='lib/ext/ext-all-debug.js'> </script> <script type='text/javascript'> Ext.onReady(function(){ var myStore = Ext.data.Store({ data:[ ["Google.com", "10", "15", "200", "100", "#ff8080", "images/google.jpg", "Лучший поисковик всех времён и народов"], ["Yandex.ru", "10", "15", "200", "100", "#ff0000;", "images/yandex.jpg", "Лучший российский поисковик "], ["Bing.ru", "10", "15", "200", "100", "#ff0000;", "images/bing.jpg", "Поисковик империи зла"] ], reader: new Ext.ArrayReader( {id:'id'}, [ 'title', 'x', 'y', 'width', 'height', 'color', 'image', 'text' ] ) }); var myGrid = new Ext.grid.EditorGridPanel({ title: 'AdBlock Table', clickstoEdit: 1, renderTo: document.body, frame: true, store: myStore, columns:[ {header: 'Title', width: 200, sortable: true, dataIndex: 'title'}, {header: 'Color', width: 150, sortable: true, dataIndex: 'color'}, {header: 'Height', width: 150, sortable: true, dataIndex: 'height'}, {header: 'Weight', width: 150, sortable: true, dataIndex: 'width'} ], frame: true, width: 600, height: 300 }) }) </script> </head> <body> </body> </html> Таблица вообще перестала отображаться :( В чем косяк? В Ext.onReady ведь можно и хранилище и редактор инициализировать..(?) |
Хэй куда все Джавасценаристы делись? :)
Стоп игноринг ми!:) |
короче, как токо подключаю store табличка перестает прорисовываться :(
p.s. сегодня все бухают ?) |
Часовой пояс GMT +3, время: 14:00. |