Welcome Guest, Not a member yet? Register   Sign In
how i can add a url in cell.
#1

[eluser]Unknown[/eluser]
hi,guys,thank u ,u make so grid ,it is powerful.

but i have a problem.

how i can add a url in cell,such as “this grid is prowerful grid”.it will be title,then ,i click this title, it will skip new page.show detailed information of this title.

thanks again
#2

[eluser]niidmore[/eluser]
try this

$("#flex1").flexigrid({
url: 'post.php',
dataType: 'xml',
colModel : [
{display: 'Nom', name : 'nom', width : 180, sortable : true, align: 'center'},
{display: 'Prenom', name : 'prenom', width : 120, sortable : true, align: 'center'},
{display: 'Structure', name : 'Nom_de_structure', width : 180, sortable : true, align: 'center'},
{display: 'Teléphone', name : 'tel', width : 130, sortable : true, align: 'center'},
{display: 'Email', name : 'email', width : 180, sortable : true, align: 'center', process: makeLink},
{display: 'Détail', name : 'num', width : 80, align: 'center', process: detail}
],
buttons : [
/*{name: 'Add', bclass: 'add', onpress : test},
{name: 'Delete', bclass: 'delete', onpress : test},*/
{separator: true},
{name: 'A', onpress: sortAlpha}


],
searchitems : [
{display: 'Nom', name : 'nom', isdefault: true},
{display: 'Prenom', name : 'prenom'}
],
sortname: "nom",
sortorder: "asc",
usepager: true,
title: 'Contacts',
useRp: true,
rp: 17,
showTableToggleBtn: true,
width: 1000,
height: 487
});

})

function makeLink(celDiv){
$(celDiv).html('<a href="abc.asp' + $(celDiv).html() + '">' + $(celDiv).html() + '</a>');
}




Theme © iAndrew 2016 - Forum software by © MyBB