In Development
Last Updated: 12 Nov 2025 13:29 by ADMIN
Philipp
Created on: 30 Oct 2025 09:53
Category: GridView
Type: Bug Report
1
TreeListView: With ColumnsVirtualization enabled, UI Freezes after editing custom column's cell and scrolling
TreeListView with IsReadOnly True and EnableColumnVirtualization True.
Custom column is defined in code with IsReadOnly False.
Runtime, user edits a cell from the column and then scrolls horizontally - this leads to UI freeze, endlessly.
2 comments
Peter
Posted on: 11 Nov 2025 19:25
We are closing this issue as the code that leads to it does not use a good practice - cells are not reused in virtualization scenario.
So this practically makes the priority of such issue close to minimum.
ADMIN
Dimitar
Posted on: 10 Nov 2025 11:13

Hi,

The proper solution would be to reuse the cells when using a custom column. Here is an example:

public class MyCustomColumn : GridViewDataColumn
{
    public MyCustomColumn()
    {
        Background = Brushes.Red;
    }

    public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
    {
        HighlightTextBlock highlightTextBlock =  cell.Content as HighlightTextBlock;

        if (ShouldCreateNewTextBlock(highlightTextBlock))
        {
            highlightTextBlock = new HighlightTextBlock
            {
                DataType = DataType,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Center,
            };
            highlightTextBlock.SetBinding(HighlightTextBlock.TextProperty, DataMemberBinding);
        }

        Validation.SetErrorTemplate(highlightTextBlock, new ControlTemplate());
        return highlightTextBlock;
    }

    private bool ShouldCreateNewTextBlock(HighlightTextBlock highlightTextBlock)
    {
        return highlightTextBlock == null || highlightTextBlock is not HighlightTextBlock;
    }

    public override bool CanEdit(object item) => true;
}

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.