hi, i have a datatable , at the click of a row of datatable I open a window containing a form .
it’s possible write in the head of window a value of cell datatable ?
webix.ui({
view:"window",
id:"frmEdit",
move:true,
width:600,
height:600,
position:"center",
modal:true,
head:{
view:"toolbar", cols:[
{view:"label", label: "Edit Owner"}
]
},
body:webix.copy(form_edit)
});
near Edit Owner i want write the name of owner (cell of datatable)
Thanks
You can set the title before showing the window:
$$("frmEdit").getHead().define("template","Title: "+this.getItem(id).title);
$$("frmEdit").show();
http://webix.com/snippet/e13fd6d1
i want chang header of window when i click on datatable row, header title = row datatable field
Yep, I forgot about it, sorry. Refresh the header after define
:
$$("editor").getHead().define("template","Title: "+this.getItem(id).title);
$$("editor").getHead().refresh();
$$("editor").show();
I tried but I do not work , the problem is that my window is already open , click the row of datatable and I would write his id on the header of the form
head:{
view:"toolbar", margin:-4, cols:[
{ view:"label", label: "Owner details" },
{ view:"icon", icon:"times-circle", click:"$$('frmDettagliOwner').hide();"}
]
}
problem is my head is this, i want chang only label Owner details
it’s possible only change the title or it’s possible append string at the title of header windowd?
It depends on the content of your header. In your case, it’s better to define a new value directly to the label:
http://webix.com/snippet/462c911d
oh yes! this is perfect! thanks !
it’s possible change font and color at string this.getItem(id).title ? thanks