单击 url 列的网格 webix
Grid webix with url column click
刚刚在 webix 中创建了一个 table,我有一个“待定”列,其中显示了一个 URL,我的问题是:如何制作这个 URL https://pops.dra.com/TBD.php?jour=$adep&arc=$ads
可以点击吗?
while($row = mysqli_fetch_array($requete, MYSQLI_ASSOC)) {
$row_array['ac'] = $row["TA"];
$row_array['ad'] = $row["day"];
$ad = $row["day"];
$row_array['ads'] = $row["arc"];
$ads = $row["arc"];
$row_array['eob'] = $row["pl"];
$row_array['linkjournal'] = "https://pops.dra.com/TBD.php?jour=$adep&arc=$ads";
array_push($small_film_set2, $row_array);
}
}
$date_update = $small_film_set2[1]['adep'];
?>
var small_film_set2 = <?php echo json_encode($small_film_set2) ?>;
webix.ready(function(){
grid = webix.ui({
container:"testA",
view:"datatable",
columns:[
{ id:"index", header:"TA", sort:"int"},
{ id:"ac", header:["CT", {content:"selectFilter"}],width:120, sort:"string"},
{ id:"ad", header:["Date", {content:"textFilter"}] , width:120, sort:"int"},
{ id:"ads", header:["Arcid", {content:"textFilter"}], width:100, sort:"string"},
{ id:"eob", header:["Pl", {content:"textFilter"}], width:100, sort:"string"},
{ id:"linkjournal", header:["TBD"], width:220, sort:"string"}
//{ id:"ssr", header:"Nb", width:100, sort:"int", header:[ "nb", {content:"summColumn" }] }
],
autoheight:true,
autowidth:true,
data:small_film_set2,
on:{
"data->onStoreUpdated":function(){
this.data.each(function(obj, i){
obj.index = i+1;
})
}
}
});
});
感谢您的帮助
定义一个列模板,您可以在其中添加html个元素,例如:
{
id:"linkjournal", header:["TBD"],
width:220, sort:"string",
template: obj => `<a href="${obj.linkjournal}">link text</a>`
}
刚刚在 webix 中创建了一个 table,我有一个“待定”列,其中显示了一个 URL,我的问题是:如何制作这个 URL https://pops.dra.com/TBD.php?jour=$adep&arc=$ads
可以点击吗?
while($row = mysqli_fetch_array($requete, MYSQLI_ASSOC)) {
$row_array['ac'] = $row["TA"];
$row_array['ad'] = $row["day"];
$ad = $row["day"];
$row_array['ads'] = $row["arc"];
$ads = $row["arc"];
$row_array['eob'] = $row["pl"];
$row_array['linkjournal'] = "https://pops.dra.com/TBD.php?jour=$adep&arc=$ads";
array_push($small_film_set2, $row_array);
}
}
$date_update = $small_film_set2[1]['adep'];
?>
var small_film_set2 = <?php echo json_encode($small_film_set2) ?>;
webix.ready(function(){
grid = webix.ui({
container:"testA",
view:"datatable",
columns:[
{ id:"index", header:"TA", sort:"int"},
{ id:"ac", header:["CT", {content:"selectFilter"}],width:120, sort:"string"},
{ id:"ad", header:["Date", {content:"textFilter"}] , width:120, sort:"int"},
{ id:"ads", header:["Arcid", {content:"textFilter"}], width:100, sort:"string"},
{ id:"eob", header:["Pl", {content:"textFilter"}], width:100, sort:"string"},
{ id:"linkjournal", header:["TBD"], width:220, sort:"string"}
//{ id:"ssr", header:"Nb", width:100, sort:"int", header:[ "nb", {content:"summColumn" }] }
],
autoheight:true,
autowidth:true,
data:small_film_set2,
on:{
"data->onStoreUpdated":function(){
this.data.each(function(obj, i){
obj.index = i+1;
})
}
}
});
});
感谢您的帮助
定义一个列模板,您可以在其中添加html个元素,例如:
{
id:"linkjournal", header:["TBD"],
width:220, sort:"string",
template: obj => `<a href="${obj.linkjournal}">link text</a>`
}