How to read a c# array object in Widget designer c# file
Hi,
I tried to read a C# object array in the designer js file I get the object but when I try to iterate it it say undefined.
This is my code
c# property
private object[] _UrlandTitles = "Hello1", "Hello2", "Hello3" ;
public object[] UrlandTitles
get return _UrlandTitles;
set _UrlandTitles = value;
Designer js refreshUI
refreshUI: function ()
var data = this._propertyEditor.get_control();
alert(Array()data.UrlandTitles);
,
Hi Moiz,
In this is the code you use, you can replace the object with string array, otherwise you have to mark the property you have with an attribute [DataMember] - when applied to the member of a type, specifies that the member is part of a data contract and is serializable by the DataContractSerializer.
Best wishes,
Ivan Dimitrov
the Telerik team