establishing link between table based on values inside a table

9 views
Skip to first unread message

dlamotte

unread,
Feb 10, 2011, 6:22:20 AM2/10/11
to Lipsiadmin
hi i'm discovering extjs and lispiadmin altogether.

i need a way to link row data between view with additional parameter
to filter the view.

For example on the following example:

Blog
hm posts

i want to show on the Blog view the count of posts made and to have a
link on the count to redirect to the post view for the specific view.

i try to add a specific renderer like this one , given "link|label"
string
:renderer => "function(value, metaData, record, rowIndex, colIndex,
store) {var d = value.split('|') ;return '<a href=\"+d[0]+\" target=
\"_blank\">' + d[1] +'</a>';}"

or
:renderer => "function(value, metaData, record, rowIndex, colIndex,
store) {var d = value.split('|') ;return '<a href=\"#\" onclick=
\"Backend.app.load('+d[0]+');\">' + d[1] +'</a>';}"

but the renderer is not made inside the grid, i see the given "link|
label" string instead.

var gridPanelColumnModel = new Ext.grid.ColumnModel({
columns: [gridPanelCheckboxSelectionModel,{
dataIndex: "links.target_link",
sortable: true,
renderer: "function(value, metaData, record, rowIndex, colIndex,
store) {var d = value.split('|') ;return '<a href=\"+d[0]+\" target=
\"_blank\">' + d[1] +'</a>';}",
name: "link[target_link]",
header: "Target",
id: "links_target_link"
}]
});

any idea?

Best regards
Denis Lamotte


Reply all
Reply to author
Forward
0 new messages