Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
XamDataGrid add new column and fill from array on fly

I am trying to add new column to xamdatagrid on fly. I am getting the column anseright but I can't fill it. 

Can someone show me what I am doing wrong.

Here is xml

  <igDP:XamDataGrid  DataSource="{Binding Path=Container.Columns}" GroupByAreaLocation="None" 

                <igDP:FieldLayoutSettings AutoGenerateFields="False"



C# code

 public partial class SpreadsheetView : Window
        public SpreadsheetView()

        public SpreadsheetViewModel ViewModel
            get { return this.DataContext as SpreadsheetViewModel; }

        void xamDataGrid_FieldLayoutInitialized(object sender, Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializedEventArgs e)
            List<ISimulatedValue> container = this.ViewModel.Container.Columns;


            for (int i = 0; i < container.Count; i++)
                var field = new UnboundField
                    Name = container[i].Name,
                    BindingMode = BindingMode.TwoWay,
                    BindingPath = new PropertyPath(String.Format("{0}[{1}]", nameof(ISimulatedValue.AllValues), i)),
                    AllowEdit = false,
                    Format = "P2"


                field.Settings.EditAsType = typeof(String);





I got the colum names right, but I can't fill them.

ISimulatedValues.AllValues returns double array