UserData associated with deleted rows

I have a treegrid where each row has an associated set of UserData.

When I delete a row, I’d like the associated UserData deleted as well. How do I do that?

I’ve used getUserData() and setUserData(), but neither of those appears to do what I need.

Is there an automated way to achieve the UserData deletion at the same time as the row deletion? Or, how do I do it through my own code?

Thanks

You can attach handler to onAfterRowDeleted event and from it call

if (this.UserData[id]) delete this.UserData[id];

Thanks. I’ll give that a try.