RadVirtualGrid.Selection.HasSelection (VirtualGridSelection.HasSelection) or is never false.
RadVirtualGrid grid = new RadVirtualGrid();
var hasSelection1 = grid.Selection.HasSelection;
_grid.Selection.ClearSelection();
var hasSelection2 = grid.Selection.HasSelection;
After initializing the grid, and not loading anything, HasSelection is true, while nothing is selected.
After clearing the selection, HasSelection remains true.
This property is used in your own code as a pretest for some operations. (Like Copy or Cut).
Am I interpreting this property the wrong way?
Hi, Martin,
After clearing the selection in RadVirtualGrid, the SelectedRegion has the following value:
The Empty region doesn't have a value for the ViewInfo:
That is why the property always returns true:
/// <summary>
/// Gets a value indicating whether there are selected cells.
/// </summary>
public bool HasSelection
{
get { return this.CurrentViewInfo != null && this.SelectedRegion != SelectionRegion.Empty; }
}
I have approved this item.
I have also updated your Telerik points.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.