dynamic column binding

Mar 26, 2013 at 10:06 AM
      public class Importo
{
    public string valoreimporto { get; set; }
}

ObservableCollection<Importo> Imp = new ObservableCollection<Importo>();
                      for (int i = 0; i < header.Count; i++)
                         {
                                 ExtendedGrid.ExtendedColumn.ExtendedDataGridTextColumn                                 nuovacolonna = new ExtendedGrid.ExtendedColumn.ExtendedDataGridTextColumn();

                                nuovacolonna.Header = header[i];   

                                Imp = op.zona(header[i], listsearch, nselect, fat, Imp);                                  
                                nuovacolonna.Binding = new Binding("Imp");
                                datagrid2.Columns.Add(nuovacolonna);
                         }
The binding is put the name of the collection?
Coordinator
Mar 27, 2013 at 6:21 PM
Hi

I guess it should be like this

nuovacolonna.Binding = new Binding("valoreimporto");

and grid should be binded to collection.

Regards,
bpoojary