Amit Adlak
How to set the coloumn width in wpf usercontrol using C1 flexgrid
By Amit Adlak in Windows Forms on Jun 03 2011
  • Amit Adlak
    Jun, 2011 27

    ·                 public MainWindow()
    ·                 {
    ·                     InitializeComponent();
    ·          
    ·                     // create grid, add to page
    ·                     var flex = new C1.WPF.FlexGrid.C1FlexGrid();
    ·                     this.LayoutRoot.Children.Add(flex); 
    ·          
    ·                     // bind to some data 
    ·                     flex.AutoGenerateColumns = false;
    ·                     flex.ItemsSource = Product.GetProducts(200);
    ·          
    ·                     // create the columns
    ·                     foreach (string property in "Line,Color,Name,Price,Weight".Split(','))
    ·                     {
    ·                         var col = new C1.WPF.FlexGrid.Column();
    ·                         col.Header = property;
    ·                         col.Binding = new Binding(property);
    ·                         flex.Columns.Add(col);
    ·                     }
    ·                 }

    ·          

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS