This question is locked. New answers and comments are not allowed.
I am writing to ask if it is possible to assign the attributes of a List of Strings, contained within a C# class, to the RadDataGrid;
In the requirements of our project, we are trying to not pre-define properties in a C# class - rather build the C# class dynamically, based on the results from a Json.Net call to an ASP.Net Web API, which communicates with an SQL Server database;
this.DataGrid.ItemsSource = newListInstance - at this line, in debug mode, I can see the values in the public List<string> Attributes; however, I have been unable to successfully navigate to the level where Attibutes reside;
newListInstance is the instance of the class MyClass, and if bound to the RadDataGrid, displays two columns (Metric_Display_Name and Attributes); The Attibutes column displays 22 rows of System.Collections.Generic.List'1[System.String]
Thanks in advance for any insight, guidance;
In the requirements of our project, we are trying to not pre-define properties in a C# class - rather build the C# class dynamically, based on the results from a Json.Net call to an ASP.Net Web API, which communicates with an SQL Server database;
this.DataGrid.ItemsSource = newListInstance - at this line, in debug mode, I can see the values in the public List<string> Attributes; however, I have been unable to successfully navigate to the level where Attibutes reside;
newListInstance is the instance of the class MyClass, and if bound to the RadDataGrid, displays two columns (Metric_Display_Name and Attributes); The Attibutes column displays 22 rows of System.Collections.Generic.List'1[System.String]
Thanks in advance for any insight, guidance;
List<MyClass> newListInstance = new List<MyClass>();foreach (var child in jObj.Children()) { MyClass instance = new MyClass(); for (int j = 0; j < child.Count; j++) { instance.AddAttribute((string)child[j]); } newListInstance.Add(instance);}class MyClass { public string Metric_Display_Name { get; set; } public List<string> Attributes { get; private set; } public MyClass() { Attributes = new List<string>(); } public void AddAttribute(string value) { Attributes.Add(value); } }