Unplanned
Last Updated: 17 Nov 2025 09:55 by ADMIN
Chris
Created on: 17 Nov 2025 09:50
Category: DataGrid
Type: Bug Report
1
DataGrid: Cell editor loses content when scrolled out of view and start editing another cell and using celledit template
When using cell editor template and editing the cell, and at some point exits the view port, to start editing another cell this makes the content of the previous cell to disappear.
1 comment
ADMIN
Didi
Posted on: 17 Nov 2025 09:55

Workaround

Get access to the DataGrid ScrollView and on Scrolled event you can execute the commit edit or cancel commit command

public MainPage()
	{
		InitializeComponent();
		this.dataGrid.ItemsSource = GetSampleProducts();


		RadScrollView sv1 = FindRadScrollView(this.dataGrid);
		if (sv1 != null)
		{
			sv1.Scrolled += Sv_Scrolled;
		}
	}

	private void Sv_Scrolled(object? sender, ScrolledEventArgs e)
	{
		this.dataGrid.CommandService.ExecuteDefaultCommand(DataGridCommandId.CancelEdit, new EditContext(null, ActionTrigger.Programmatic, null));
		
	}

	private RadScrollView? FindRadScrollView(RadDataGrid grid)
	{
		foreach (var child in grid)
		{
			if (child is RadScrollView sv)
			{
				return sv;
			}
		}
		return null;
	}

Regards,
Didi
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.