Setting Window Name

Hi,

i have a treegrid. Doubleclicking on it, a window should get the name of the selected record, and show. So far so good. My code is working, but only once.

I have no idea why. Closing the window, and clicking on a other record, will give the window the same (wrong) name as before (other record). Anyone any idea ?

Heres my code :

isc.TreeGrid.create({
   dataSource:Hauptmenue,
   ID:"TreeGrid1",
   autoFetchData:true,
   autoDraw:false,
   recordDoubleClick: function() {
     var record = this.getSelectedRecord();
     Window1.title = "Artikel " + record.itemname;
     Window1.show();
   }
})

isc.Window.create({
    ID:"Window1",
    title:"Artikel",
    top: 110,
    left:270,
    width:"60%",
	height: "80%",
    autoDraw: false,
    showMinimizeButton:false,	
    canDragReposition: true
})

Try using the setTitle() method instead of assigning the value to the title property.

Excellent…

That did it. Thanks a lot !

You’re welcome. :slight_smile: