Please expose the current data of the Grid and TreeList when using Data or OnRead. This will spare the need to cache data for the second time in-memory, or repeat all data operations. The benefit is that the app can:
A similar feature we implemented in the combobox with the following code:
public TItem GetSelectedItem()
{
return SelectedDataItem != null && SelectedDataItem.DataItem != null ? (TItem)SelectedDataItem.DataItem.Clone() : default(TItem);
}
public ReadOnlyCollection<TItem> GetAllReadonlyDataItems()
{
List<TItem> dataItems = new List<TItem>();
foreach (var item in DataItems)
{
if (item.DataItem is TItem dataItem)
{
var clonedDataItem = (TItem)dataItem.Clone();
dataItems.Add(clonedDataItem);
}
}
return new ReadOnlyCollection<TItem>(dataItems);
}