Here is the table definition. It is loaded correctly on the initial rendering. However if the contents of "resultset" is updated how do i get it to reread "resultset"? MarkDirty() doesn't cut it.
// add result table
t := gwu.NewTable()
t.SetCellPadding(2)
t.Style().SetFontSize("80%")
var tsize int
tsize = qRows * 3
t.EnsureSize( tsize , 6)
var i int = 0
for tuple := 0; tuple < tsize ; tuple += 3 {
Element := resultSet[i]
for attribute := 0; attribute < 17 ; attribute++ {
switch attribute {
case 0 : t.Add(gwu.NewLabel(Element.Fname.String), tuple , 0)
case 1 : t.Add(gwu.NewLabel(Element.Land.String), tuple, 1)
case 2 : t.Add(gwu.NewLabel(Element.Plz.String), tuple, 2)
case 3 : t.Add(gwu.NewLabel(Element.Ort.String), tuple, 3)
case 4 : t.Add(gwu.NewLabel(Element.Straße.String), tuple, 4)
case 5 : t.Add(gwu.NewLabel(Element.Cdate.String()), tuple, 5)
case 6 : t.Add(gwu.NewLabel(Element.Title.String), tuple + 1, 0)
case 7 : t.Add(gwu.NewLabel(Element.Acdtitle.String), tuple + 1, 1)
case 8 : t.Add(gwu.NewLabel(Element.Firstname.String), tuple + 1, 2)
case 9 : t.Add(gwu.NewLabel(Element.Surname.String), tuple + 1, 3)
case 10 : t.Add(gwu.NewLabel(Element.Source.String), tuple + 1, 4)
case 11 : t.Add(gwu.NewLabel(Element.Sourceref.String), tuple + 1, 5)
case 12 : t.Add(gwu.NewLabel(Element.Workemail.String), tuple + 2, 0)
case 13 : t.Add(gwu.NewLabel(Element.Workphone.String), tuple + 2 , 1)
case 14 : t.Add(gwu.NewLabel(Element.Workfax.String), tuple + 2, 2)
case 15 : t.Add(gwu.NewLabel(Element.Workmobile.String), tuple + 2, 3)
case 16 : t.Add(gwu.NewLabel(Element.Workurl.String), tuple + 2, 3)
}
if tuple % 2 == 0{
t.RowFmt(tuple).Style().SetBackground("#C9CDD8")
t.RowFmt(tuple + 1).Style().SetBackground("#C9CDD8")
t.RowFmt(tuple + 2).Style().SetBackground("#C9CDD8")
}else{
t.RowFmt(tuple).Style().SetBackground("#EFF2F8")
t.RowFmt(tuple + 1).Style().SetBackground("#EFF2F8")
t.RowFmt(tuple + 2).Style().SetBackground("#EFF2F8")
}
}
i++
//fmt.Println("rendering table ", i)
}
p.Add(t)
thanks for your advice,
Nigel Vickers