Opened 8 years ago
Closed 7 years ago
#17391 closed defect (patchwelcome)
DataGrid is not resized correctly.
Reported by: | Tsuyoshi | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
If DataGrid? consists of two or more DataViewDef? and drags from Bar's right-hand side, it will not be resized correctly.
http://www.youtube.com/watch?v=IQplOnFk08g
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojox/grid/resources/claroGrid.css"> <style type="text/css"> #gridDiv {height: 20em;} </style> <script>dojoConfig = {async: true, parseOnLoad: false}</script> <script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js"></script> <script> require(['dojo/_base/lang', 'dojox/grid/DataGrid', 'dojo/data/ItemFileWriteStore', 'dojo/dom', 'dojo/domReady!'], function(lang, DataGrid, ItemFileWriteStore, dom){ var data = { identifier: "id", items: [{ id: 1, col1: "col1", col2: "col2", col3: "col3"}] }; var store = new ItemFileWriteStore({data: data}); var layout1 = [[ {'name': 'Column 1', 'field': 'id', 'width': '100px'} ]]; var layout2 = [[ {'name': 'Column 1', 'field': 'col1', 'width': '100px'}, {'name': 'Column 2', 'field': 'col2', 'width': '100px'}, {'name': 'Column 3', 'field': 'col3', 'width': '100px'} ]]; var layout = [{cells: layout1, noscroll: true}, {cells: layout2}]; // <=== var grid = new DataGrid({ id: 'grid', store: store, structure: layout}); grid.placeAt("gridDiv"); grid.startup(); }); </script> </head> <body class="claro"> <div id="gridDiv"></div> </body> </html>
Note: See
TracTickets for help on using
tickets.
DojoX Grid and EnhancedGrid? are deprecated in favor of dgrid and gridx.
You should upgrade your code to use one of those two grids.
We will consider patches to the old DojoX Grid code though.