Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using System.Collections.ObjectModel;
- namespace DemoDataGrid
- {
- public class Row {
- public string Col1 { get; set;}
- public string Col2 { get; set;}
- public string Col3 { get; set;}
- }
- /// <summary>
- /// Interaktionslogik für MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- for (int i = 0; i < 10; i++)
- {
- DataGridDS.Add(new Row
- {
- Col1 = "co asd asdfasd fasd fa sdf asd f asd fas df as fw qf wqe fqw efqwef qwef qwef qwef qwef l1 " + i,
- Col2 = "col2 " + i,
- Col3 = "col3 " + i,
- });
- }
- }
- private ObservableCollection<Row> _dataGridDS = new ObservableCollection<Row>();
- public ObservableCollection<Row> DataGridDS { get { return _dataGridDS; } }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement