DataView set()

Hi everybody.
I’m just working with dataview set()-method.
I only want to update the name value of the object.
Unforunately all hash data is overwritten.
Do you know what i mean and can help out?

As it is documented:
You can shoose name of the property and set new value for it

view.set("fruit18", { Fruit: "banana" });

Yes, thats right so far.
But if fruit18 contains a member “colour” for example, colour is set to null.

What we have …

view.get("fruit18") // --> Fruit "banana", colour:"yellow"

update …

view.set("fruit18", { Fruit: "apple" });

results in:

view.set("fruit18", { Fruit: "apple", colour: "null" });

You need just to call method refresh() to redraw item after set():

Ah ok. Thanks very much.

You are welcome!