Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

select

var columns = records.First()
    .Properties
    .Select((x, i) => new {Name = x.Name, Index = i})
    .ToArray();

foreach (var column in columns)
{
    var binding = new Binding(string.Format("Properties[{0}].Value", column.Index));

    dataGrid.Columns.Add(new DataGridTextColumn() {Header = column.Name, Binding = binding });
}
Source by paulstovell.com #
 
PREVIOUS NEXT
Tagged: #select
ADD COMMENT
Topic
Name
8+7 =