PDA

View Full Version : Sequence column in treepanel



Ixtinkt
14 Feb 2013, 5:29 AM
I have treepanel item. I want to add column with sequence number of line. I tried to do this, but nothing good
itemId: 'order_lines', xtype: 'treepanel',
title: 'Order Lines',
cls: 'crazy_order_lines',
loadMask: {msg: 'Fetching...'},
rootVisible: false, // Das ist nicht nur f�r diese Darstellung sinnvoll, sondern der Tree funktioniert auch nicht richtig, wenn man den Rootknoten sichtbar hat, aber nicht angibt (sondern versucht, ihn asynchron laden zu lassen)
multiSelect: true,

columns: [
{xtype: 'treecolumn', header: 'Pos', sortable: true, dataIndex: 'INHERENT_SORTING', width: 55, renderer: function () { return ''; }, style: {cursor: 'help'}, tooltip: 'Click here to sort in original order'},
{header: 'order_line_id', sortable: true, hidden: true, dataIndex: 'order_line_id', width: 100},
// {header: 'order_id', sortable: true, hidden: true, dataIndex: 'order_id', width: 100},
{header: 'article_id', sortable: true, hidden: true, dataIndex: 'article_id', width: 100},
// {header: 'INHERENT_SORTING', sortable: true, hidden: true, dataIndex: 'INHERENT_SORTING', width: 250},
{header: 'order_piece_id', sortable: true, hidden: true, dataIndex: 'order_piece_id', width: 100},
{header: 'piece_id', sortable: true, hidden: true, dataIndex: 'piece_id', width: 100},
{header: 'sequence_number', sortable: true, hidden: false, dataIndex: 'sequence_number', width: 100, renderer: function(){
return '2';
}},
....

mitchellsimoens
17 Feb 2013, 8:14 AM
Have you tried using the Ext.grid.RowNumberer to see if that would work in the tree grid?