PDA

View Full Version : [CLOSED] how to use other column's value in renderer listener?



hdsoso
Oct 14, 2013, 1:30 PM
var renderArt = function (v) {
return "<a target='_blank' href='../../article.aspx?aid=" + v + "'>" + v + "</a>";
};

<ext:Column runat="server" DataIndex="id" Text="编号">
<Renderer Fn="renderArt"></Renderer>
</ext:Column>
<ext:Column runat="server" DataIndex="title" Text="标题" Flex="1">

</ext:Column>

now i render a link to the column id , but i want to render the column title, but if render title , i can not get article's id in render 's function , because v is the column's value but not other column's value?

how to render the column's title , but i need the id value, how to do?

Daniil
Oct 14, 2013, 4:03 PM
Hi @hdsoso,

Many arguments are passed to a Renderer function.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column-cfg-renderer

The third one is a record which hold all the fields.