PDA

View Full Version : gird sub header change text



zlevardy
27 Feb 2013, 2:18 AM
hi,

I would like to change the text of sub-headers, like Direct / AsOf, but could not get the reference for it. I have tried as gird.columns[3].setText('new'); but this is failing...



this.columns = [
{
text: "Item", dataIndex: 'item'
},
{
text: 'Direct',
columns: [
{text: "As of", style: dataIndex: 'dasof' },
{text: "Average", style: dataIndex: 'davg' }
]
},
{
text: 'Reciprocal',
columns: [
{text: "As of", style: dataIndex: 'rasof' },
{text: "Average", style: dataIndex: 'ravg' }
]
}
];


thx

EPV
27 Feb 2013, 8:53 AM
Try this out:



grid.columns[0].getGridColumns()[0].setText('newtext');


Good luck!

zlevardy
28 Feb 2013, 1:02 AM
thanks, this works :D