This project is read-only.

Problem when using TableViewColumn.CellTemplate



Really impressed with the performance of this table.
However i am seeing issues when using the CellTemplate.
When its scroll into view they appear loose their order. Perhaps something to do with visualization.
This is easily recreatable by changing the demo as below:
    // Programatically add some columns to the TableView
    private void BuildTableViewColumns()
        for (int i = 0; i < 26; ++i)
            var path = "Data[" + i + "].FieldValue";
            var template = CreateDataTemplate(path);
            tableView.Columns.Add(new TableViewColumn() { Title = path, Width = 60, CellTemplate = template});

    private DataTemplate CreateDataTemplate(string path)
        var template = new DataTemplate();
        var textBlock = new FrameworkElementFactory(typeof(TextBlock));
        var binding = new Binding(path);
        textBlock.SetBinding(TextBlock.TextProperty, binding);
        template.VisualTree = textBlock;
        return template;
Have also attached a screen shot of how the issue manifests itself.
I'll have a go at fixing myself and let you know how i get on.



file attachments


JP1980 wrote Dec 23, 2014 at 11:42 PM

Experiencing same thing. Trying to display an image with a celltemplate. Did you solve it?