你好,并不是其他的问题,我在你们的页面上进行调试的,仅仅修改了以下几个地方,是基于你上次发我的链接上修改的
- <style>
- .wj-flexgrid .wj-marquee, .wj-flexgrid .wj-header, .wj-flexgrid .wj-cell {
- text-align: right;
- transition: all 0.4s;
- }
- </style>
复制代码- var autoFitColumnHeaderWidth = function(s,e){
- setTimeout(function() {
- for(var i=0;i< s.columnHeaders.rows.length;i++){
- var row = s.columnHeaders.rows[i];
- row.wordWrap = true;
- }
- s.autoSizeRow(s.columnHeaders.rows.length-1, true);
- });
- }
- // bind a grid to the raw data
- var theGrid = new FlexGrid('#theGrid', {
- allowSorting: false,
- showSort: false,
- autoGenerateColumns: false,
- columns: [
- { binding: 'country', header: 'This is the Country column, but the heading is ridiculously wide so we have to wrap...', width: '2*' },
- { binding: 'sales', header: 'Sales', width: '*', format: 'n2' },
- { binding: 'expenses', header: 'Expenses', width: '*', format: 'n2' }
- ],
- itemsSource: data,
- showSelectedHeaders: 'All',
- showMarquee: true,
- deferResizing: true,
- resizedColumn: autoFitColumnHeaderWidth,
- loadedRows: autoFitColumnHeaderWidth
- });
复制代码
|