Completed
Last Updated: 09 Mar 2023 09:58 by ADMIN
Release R1 2023 SP1
Martin Ivanov
Created on: 04 Jan 2023 12:09
Category: GridView
Type: Bug Report
5
GridView: Paste doesn't work in cells of columns that are added at runtime

This issue manifests when RadGridView loaded some columns first (which are working) and then add more columns. The additional columns cannot paste values in their cells.

To work this around, mark the new columns as auto generated and call one of the internal methods.

newColumn.IsAutoGenerated = true;
this
.gridView.Columns.Add(newColumn); var collectionViewPropInfo = this.gridView.Items.GetType().GetProperty("CollectionView", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); var qcv = (QueryableCollectionView)collectionViewPropInfo.GetValue(this.gridView.Items); var methodInfo = qcv.GetType().GetMethod("OnElementTypeChanged", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); methodInfo.Invoke(qcv, new object[0]);

0 comments