1

Has anyone tried to set a common header text of more than one column in flexigrid?

For example: I would like to label/group second and third columns with text "Received" and fourth and last column wit text "Sent".

<script type="text/javascript">
$("#flex1").flexigrid({
    url: 'data.xml',
    dataType: 'xml',
    colModel : [
        {display: 'Ports', name : 'port', width : 40, sortable : true},
        {display: 'Bytes', name : 'rx_bytes', width : 40, sortable : true},
        {display: 'Packets', name : 'rx_pkts', width : 40, sortable : true},
        {display: 'Bytes', name : 'tx_bytes', width : 40, sortable : true},
        {display: 'Packets', name : 'tx_pkts', width : 40, sortable : true},
        ],
    usepager: false,
    useRp: true,
    width: 626,
    height: 200
});

Such a functionality is satisfied by AdvancedDataGrid in Flex (e.g. http://livedocs.adobe.com/flex/3/html/images/simpleColumnGroupbwg.png) where you can create GroupColumns. Does anyone know if such a functionality is supported by Flexigrid?

Uthman
  • 9,251
  • 18
  • 74
  • 104
  • 1
    Hi , I am not flexigrid user , but i had seen this feature in datatables , its really great http://datatables.net/release-datatables/examples/basic_init/complex_header.html – tawfekov Feb 14 '12 at 08:56

1 Answers1

0
colModel:[]

Sets just the names and the style of the headers.What's important is the data you'll receive from

url: 'data.xml'

So the grid names play no role.

For more information on flexigrid check this http://www.kenthouse.com/blog/2009/07/fun-with-flexigrids

Daniel
  • 2,989
  • 2
  • 25
  • 26