help needed on treeview setitem
Posted: Fri Oct 02, 2020 1:19 pm
I have a treeview where I prepared a dialog to edit the different fields and when I try to save the updated data only the first field is updated and not the subsequent ones.
Probably I do something wrong. Help please.
This is part of the XML involved:
This is the code to save the data in the existing field
Probably I do something wrong. Help please.
This is part of the XML involved:
Code: Select all
<treeview id="tv" editablenodes="true">
<column title="Item" editable="true"/>
<column title="ID" editable="true"/>
<column title="shortcut" editable="true"/>
<column title="Help" editable="true"/>
<column title="Disabled" checkbox="true"/>
Code: Select all
Local a_a=moai.Get("tv", "active")
moai.DoMethod(a_a, "SetItem", 0, moai.Get("ptv_Item","text"))
moai.DoMethod(a_a, "SetItem", 1, moai.Get("ptv_ID","text"))
moai.DoMethod(a_a, "SetItem", 2, moai.Get("ptv_Scut","text"))
moai.DoMethod(a_a, "SetItem", 3, moai.Get("ptv_Help","text"))
moai.DoMethod(a_a, "SetState", 4, moai.Get("ptv_disab","selected"))