PDA

View Full Version : Grid RowBody before row data.



szanowny-pan
8 Mar 2010, 6:33 AM
Hi everyone.
As in subject I needed grid with rowBody before grid's row data to put there image which may spans all columns. I managed it by switching <tr> order in ext-all.js:


{c.row=new Ext.Template(
'<div class="x-grid3-row {alt}" style="{tstyle}">
<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
"<tbody>",
(this.enableRowBody?'
<tr class="x-grid3-row-body-tr" style="{bodyStyle}">
<td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on">
<div class="x-grid3-row-body">{body}</div>
</td>
</tr>':""),
"<tr>{cells}</tr>
</tbody>
</table>
</div>")}
Red <tr> used to be before green <tr>. In this way I achived what I wanted, but now I can't set grid's column width. Every single column in my grid has the same width. It looks like setting width in ColumnModel doesn't work any more. Before changing library, grid's columns looked like this (first picture):
And after editing library: (second picture).
Is there any way to fix it?
Thanks for any help.