Duplicated
Last Updated: 18 May 2022 09:17 by ADMIN

RadGridView throws error 'DataGrid_DisplayIndexOutOfRange Parameter name: displayIndex'

when SelectionUnit is set to Mixed

 

SelectionUnit = "FullRow" and SelectionUnit="Cell" works fine.

Please find attached solution for crash.

Telerik version which we are using is UI for WPF 2021

In attached demo from list of data Select any item and click on isolate button above or apply filter from column filter dialog. it throws this error

 

 

   at Telerik.Windows.Controls.GridView.GridViewDataControl.ColumnFromDisplayIndex(Int32 displayIndex)
   at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.GetColumnForLocation(CellLocation location)
   at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.CreateCellInfo(CellLocation location)
   at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.CellRegionEnumerator.GetCurrentCell()
   at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.CellRegionEnumerator.MoveNext()
   at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.CellInfoCollectionEnumerator.MoveNext()
   at Telerik.Windows.Controls.GridView.Selection.ContainerFromItemCellSelectionStateChanger.UpdateCellSelectionState(CellInfoCollection cells, Boolean isSelected)
   at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndAllowedSelection()
   at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndPendingSelection()
   at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndSelection()
   at Telerik.Windows.Controls.GridView.CellSelectionChange.Dispose()
   at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.OnOwnerItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.OnOwnerItemsCollectionChangedDispatch(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsChanged()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.RaiseCollectionChangedOnResume()
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
   at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.RaiseCollectionChangedOnResume()
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at IsolateCrash.MainWindow.Button_Click(Object sender, RoutedEventArgs e) in D:\Projects\IsolateCrash\MainWindow.xaml.cs:line 48
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at IsolateCrash.App.Main()

 

Completed
Last Updated: 17 May 2022 15:09 by ADMIN
Release LIB 2022.2.523 (23 May 2022)

The issue appears when you have two adjacent columns - one resizable on the left and one not-resizable (IsResizing=False) on the right. If you hide the left column (IsVisible=False), the resize handle of the right column is still there and it can be used to resize it. 

To work this around, you can remove the next column and add it again in the Columns collection, after you hide the previous column.

this.gridView.Columns[1].IsVisible ^= true;            
var nextColumn = this.gridView.Columns[2];
this.gridView.Columns.Remove(nextColumn);
this.gridView.Columns.Add(nextColumn);

Completed
Last Updated: 17 May 2022 14:55 by ADMIN
Release LIB 2022.2.523 (23 May2022)

The SelectedCells collection of RadGridView contains wrong cells in a scenario where the previous selection is cleared and then its items are filtered out of the view. This reproduces with SelectionMode set to Extended and SelectionUnit set to Mixed.

This happens if you call gridView.SelectedItems.Clear() or gridView.UnselectAll(). You can work around the issue if you clear the SelectedCells. To do so, call also gridView.SelectedCells.Clear().
gridView.SelectedCells.Clear();

Won't Fix
Last Updated: 03 May 2022 13:40 by ADMIN
DataContext of rows is sometimes null when UI virtualization is enabled in the Flat group render mode.

The issue appears also without UI virtualization and in the Nested mode. It happens on ItemsSource reset of RadGridView, in case the old ItemsSource value wasn't empty. The DataContext is set to null for a brief moment before the old visuals are removed from the view, which causes issues in some scenarios related to CellTemplate
Completed
Last Updated: 21 Apr 2022 14:08 by ADMIN
Release R2 2022
Especiall for wide lists it would be very helpful to be able to zoom in and out of a RadGridView, in order to see more or less columns. 

Also see: http://www.telerik.com/forums/scaling-of-radgridview-content
Completed
Last Updated: 20 Apr 2022 08:08 by ADMIN
Release LIB 2022.1.425 (25 April 2022)
Not all rows of the RadGridView are shown when the control is placed in a RadPane and the GroupRenderMode is set to Flat.
Completed
Last Updated: 18 Apr 2022 08:29 by ADMIN
Release LIB 2022.1.418 (18 April 2022)
When a null or string.Empty value is set to a property, which is bound to the Text property of the HighlightTextBlock(placed in a DataTemplate for the CellTemplate property of a column) an exception is thrown upon clearing the search text.
Completed
Last Updated: 11 Apr 2022 10:28 by ADMIN
Release LIB 2022.1.411 (11 Apr 2022)
When a frozen column is resized to fill the entire RadGridView, there isn't an option to reduce its size in order to bring the other columns into view.
Completed
Last Updated: 11 Apr 2022 07:20 by ADMIN
Release LIB 2022.1.411 (11 April 2022)

The vertical scrollbar of RadGridView disappears in some cases when the last parent item is expanded and then collapsed. The issue reproduces only with the Flat GroupRenderMode and when UseLayoutRounding property is set to True.

The workaround is to avoid setting the UseLayoutRounding property to True.

 

Completed
Last Updated: 05 Apr 2022 13:40 by ADMIN
Release R2 2022

Add a textbox which allow search and filter functionality for the distinct values in the FilteringControl of RadGridView.

In the meantime, you can check the attached project that shows one way to achieve this.

Won't Fix
Last Updated: 04 Apr 2022 12:38 by ADMIN

Hi,

I am currently having issues with RadGridView's group footer: I am trying to add a button to the footer template which is supposed to trigger a command which in turn needs some info on the group it was triggered from*.

Since (unlike the header) there does not seem to be any info on the group available directly within the GroupFooterTemplate, I am pulling the group info from the parent GridViewGroupFooterRow:

                <telerik:GridViewDataColumn [...]>
                    <telerik:GridViewColumn.GroupFooterTemplate>
                        <DataTemplate>
                            <Button Command="{Binding DataContext.ShowFooterGroupCommand, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}"
                                    CommandParameter="{Binding Group.Key, RelativeSource={RelativeSource AncestorType=telerik:GridViewGroupFooterRow}}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.GroupFooterTemplate>
                </telerik:GridViewDataColumn>

This is working great as long as the RadGridView does not use Row virtualization. However, when I turn on Row virtualization and scroll around for a bit, the value I get passed as the CommandParameter is more or less random and has nothing to do with the group my button is actually located in.

I attached a small example project (.Net 6 but our app uses 4.8 so I set that as the Framework below) for you to try it yourself. Just scroll around and click the buttons while watching the debug output window. You will see that the groups in the output window will not match the group where you actually clicked the button after some scrolling.

Expected Behavior

Even when virtualizing, the Group key returned when binding to GridViewGroupFooterRow.Group(.Key) should reliably return the key of the actual group my button is placed in. It would be even better if it was somehow possible to get the group directly, without having to resort to FindAncestor.

Regards
Simon Müller
Hofmann Fördertechnik GmbH

 

* Basically I am trying to give the user a possibility to add new items to the individual groups and I don't want to add the button to the group header since that makes it too easy to accidentally hit the header's RadToggleButton, collapsing the group.

Unplanned
Last Updated: 01 Apr 2022 09:40 by Martin Ivanov
Add a method that allows you to start a cell animation when its content (the bound property of the underlying data item) changes. 
Declined
Last Updated: 31 Mar 2022 11:13 by ADMIN
Created by: LindenauAtSOG
Comments: 7
Category: GridView
Type: Bug Report
0

 

When selecting a Cell using the Mouse, the BorderColor is different to when navigating via ArrowKeys.

Also it seems that the Property IsSynchronizedWithCurrentItem does not work correctly when using ArrowKeys.

The issue with the Color can be observed in the Demo

Unplanned
Last Updated: 23 Mar 2022 10:49 by Martin Ivanov
Currently, the FilteringControl orders its filters in a StackPanel with a vertical orientation, which means that the distinct values list is placed above the field filters. Add an option to allow changing the position of the distinct values to the left or right (consider also bottom).

This is useful if you want a more compact view. Also, the feature will resolve several corner cases where the screen doesn't have enough vertical space for the Popup and its contents get clipped.
Completed
Last Updated: 21 Mar 2022 14:38 by ADMIN
Release LIB 2022.1.328 (28 March 2022)
The content of the GroupHeaderRow shows the value of the DataMemberBinding instead of the value of the DisplayMemberPath.
Completed
Last Updated: 28 Feb 2022 08:18 by ADMIN
Release LIB 2022.1.228 (28 Feb 2022)
When GridView is bound to items (ICustomTypeDescriptor) which contain a property with a dot in the name, the values in the column are not shown
Completed
Last Updated: 24 Feb 2022 16:01 by ADMIN
Release LIB 2022.1.228 (28 Feb 2022)
Part of the selection is lost when the ItemsSource of RadGridView is assigned to a VirtualQueryableCollectionView (VQCV) and select all action is executed (with Ctrl+A for example), and then the gridview control is scrolled. 
Completed
Last Updated: 15 Feb 2022 07:43 by ADMIN
Release R1 2022 SP1
The Search As You Type feature of the RadGridView control, with the VisualStudio2019 theme and the Dark color variation applied, causes the highlighted text to be hard to read.
Completed
Last Updated: 07 Feb 2022 14:37 by ADMIN
Release LIB 2022.1.214 (14 Feb 2022)

When using a QueryableCollectionView with a FilterDescriptor and a GroupDescriptor, items which are filtered won't be added to the (new) group after being edited programmatically.

For the time being, the Refresh method of the view can be called to reevaluate this or the filter descriptor can be removed and re-added.

Completed
Last Updated: 04 Feb 2022 12:14 by ADMIN
Release LIB 2022.1.207 (7 Feb 2022)

QueryableEntityCoreCollectionView internal collections not in sync.

Currently, there is no workaround to this behavior.