Completed
Last Updated: 27 Mar 2023 06:39 by ADMIN
Release R1 2023 SP1

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?

Unplanned
Last Updated: 16 Jan 2023 11:40 by ADMIN

RadVirtualGridElement.Paste does not support pasting into new rows.

I want to override RadVirtualGridElement.Paste to allow to to paste into new rows. Except when I do so, the methods to retrieve information from the clipboard (GetHtmlData/GetTextData/GetCsvData ) are private.

So now I have one request, two solutions:

  • Make GetHtmlData/GetTextData/GetCsvData  protected so I can call them when I override Paste.
  • Or split up the Paste method into two sub-methods:
    • One sub-method to retrieve the information from the clipboard which will result in a list of list of strings (like: GetClipboardData())
    • The second sub-method to do the actually Paste the list of list of strings into the grid (like: Paste(List<List<string>> data)). Of course this sub-method must be virtual.

 

Completed
Last Updated: 27 Mar 2023 06:36 by ADMIN
Release R1 2023 SP1
Created by: Martin
Comments: 1
Category: VirtualGrid
Type: Bug Report
0

Repro steps:

  • Create a RadVirtualGrid
  • Fill it with some records.
  • Make sure nothing is selected (RadVirtualGridElement.CurrentCell is null)
  • Press CTRL-C
  • A NullReferenceException is thrown (this because RadVirtualGridElement.CopyToClipboard accesses CurrentCell.ViewInfo while CurrentCell is null.)

Exception:

Message             : Object reference not set to an instance of an object.
Type                : System.NullReferenceException
Source              : Telerik.WinControls.GridView
Stack trace         : Telerik.WinControls.UI.RadVirtualGridElement.CopyToClipboard(Int32 startRow, Int32 startColumn, Int32 endRow, Int32 endColumn, VirtualGridViewInfo viewInfo, Boolean selectedOnly, Boolean cut)
                      Telerik.WinControls.UI.RadVirtualGridElement.CopySelection()
                      Turien.Windows.Forms.Telerik.VirtualGrid.VirtualGridViewPlus.RadVirtualGridElementPlus.CopySelection()
                      Turien.Windows.Forms.Telerik.VirtualGrid.VirtualGridViewPlus.VirtualGridInputBehaviorPlus.HandleUnhandledKeys(KeyEventArgs keys)
                      Telerik.WinControls.UI.VirtualGridInputBehavior.HandleKeyDown(KeyEventArgs args)
                      Telerik.WinControls.UI.RadVirtualGrid.OnKeyDown(KeyEventArgs e)
                      System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
                      System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
                      System.Windows.Forms.Control.WmKeyChar(Message& m)
                      System.Windows.Forms.Control.WndProc(Message& m)
                      System.Windows.Forms.ScrollableControl.WndProc(Message& m)
                      Telerik.WinControls.RadControl.WndProc(Message& m)
                      System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
                      System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
                      System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
                      System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
                      System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
                      System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
                      System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
                      System.Windows.Forms.Application.Run(Form mainForm)
                      Turien.Schade.PremiumCalculator.LookupTableManager.Program.Main()


Completed
Last Updated: 27 Mar 2023 06:36 by ADMIN
Release R1 2023 SP1

When copying to from the RadVirtualGrid to the clipboard, the HTML format is not supported.

I was thinking about creating a feature request, but I really think this is a bug, because:

  1. It is not consistent with its little brother RadGridView, which does support HTML.
  2. HTML should be supported by Teleriks own documentation: https://docs.telerik.com/devtools/winforms/controls/virtualgrid/copy-paste-cut 

Please, implement the support for HTML.

Completed
Last Updated: 27 Mar 2023 06:36 by ADMIN
Release R1 2023 SP1

When I use the Copy method in the RadGridView, the content is copied to the clipboard in multiple formats. Each format can be cancelled. If a format is cancelled it is not even serialized into the DataObject. This way a programmer can replace the copy-routine for that format with his own.

When I do the same with RadVirtualGrid, and I only want to copy format CSV and I want to cancel the rest, nothing is copied to the clipboard. The funny thing is, inspecting the code, the data is always serialized to the DataObject BEFORE the event is fired to find out if that action is needed. This is a performance penalty.

So these two behaviors are inconsistent. It is also inconsistent the the Paste-operations of both grids.

Current code:

public void CopyToClipboard(
      int startRow,
      int startColumn,
      int endRow,
      int endColumn,
      VirtualGridViewInfo viewInfo,
      bool selectedOnly,
      bool cut)
    {
      DataObject dataObject = new DataObject();
      string data1 = this.ProcessContent(DataFormats.Text, startRow, startColumn, endRow, endColumn, viewInfo, selectedOnly, cut);
      dataObject.SetData(DataFormats.UnicodeText, false, (object) data1);
      VirtualGridClipboardEventArgs args1 = new VirtualGridClipboardEventArgs(false, DataFormats.UnicodeText, dataObject, this.CurrentCell.ViewInfo);
      this.OnCopying(args1);
      if (args1.Cancel)
        return;
      dataObject.SetData(DataFormats.Text, false, (object) data1);
      VirtualGridClipboardEventArgs args2 = new VirtualGridClipboardEventArgs(false, DataFormats.Text, dataObject, this.CurrentCell.ViewInfo);
      this.OnCopying(args2);
      if (args2.Cancel)
        return;
      string data2 = this.ProcessContent(DataFormats.CommaSeparatedValue, startRow, startColumn, endRow, endColumn, viewInfo, selectedOnly, cut);
      dataObject.SetData(DataFormats.CommaSeparatedValue, false, (object) data2);
      VirtualGridClipboardEventArgs args3 = new VirtualGridClipboardEventArgs(false, DataFormats.CommaSeparatedValue, dataObject, this.CurrentCell.ViewInfo);
      this.OnCopying(args3);
      if (args3.Cancel)
        return;
      Clipboard.SetDataObject((object) dataObject);
    }
Suggested code:


public void CopyToClipboard(
	int startRow,
	int startColumn,
	int endRow,
	int endColumn,
	VirtualGridViewInfo viewInfo,
	bool selectedOnly,
	bool cut)
{
	DataObject dataObject = new DataObject();

	VirtualGridClipboardEventArgs eventArgs = new VirtualGridClipboardEventArgs(false, DataFormats.UnicodeText, dataObject, CurrentCell.ViewInfo);
	OnCopying(eventArgs);
	bool useText = !eventArgs.Cancel;
	
	eventArgs = new VirtualGridClipboardEventArgs(false, DataFormats.UnicodeText, dataObject, CurrentCell.ViewInfo);
	OnCopying(eventArgs);
	bool useUnicodeText = !eventArgs.Cancel;

	if (useText || useUnicodeText)
	{
		string text = __instance.ProcessContent(DataFormats.Text, startRow, startColumn, endRow, endColumn, viewInfo, cut);
		if (useText)
			dataObject.SetData(DataFormats.Text, false, text);
		if (useUnicodeText)
			dataObject.SetData(DataFormats.UnicodeText, false, text);
	}
	eventArgs = new VirtualGridClipboardEventArgs(false, DataFormats.Text, dataObject, CurrentCell.ViewInfo);
	OnCopying(eventArgs);
	if (!eventArgs.Cancel)
	{
		string csv = __instance.ProcessContent(DataFormats.CommaSeparatedValue, startRow, startColumn, endRow, endColumn, viewInfo, selectedOnly, cut);
		dataObject.SetData(DataFormats.CommaSeparatedValue, false, csv);
	}
	
	if (dataObject.GetFormats().Length > 0)
		Clipboard.SetDataObject(dataObject);
}

Unplanned
Last Updated: 16 Nov 2021 12:46 by ADMIN

Please refer to the attached sample project and the gif file. You will notice that when resizing the grid, in certain cases unnecessary horizontal scrollbar appears.

Completed
Last Updated: 07 Jun 2021 16:24 by ADMIN
Release R2 2021 SP1
I'm trying to save the layout of a VirtualGrid to retain the user's settings and I started setting up the custom serialization rules and was continually getting errors.
Completed
Last Updated: 18 Feb 2021 12:21 by ADMIN
Release R1 2021 SP2

I have a RadVirtualGrid with hierarchical data. When I change the page, then expand a row, and then hit the tab key I get an ArgumentOutOfRangeException:

Value of '-3838' is not valid for 'Value'. 'Value' must be between 'Minimum' and 'Maximum'.
Parameter name: Value

 

Completed
Last Updated: 06 Apr 2021 13:41 by ADMIN
Release R2 2021

When you have a RadVirtualGrid with hierarchy and after expanding a row if you right-click a cell in the child grid and select the "Copy" item, it doesn't copy the text of the cell I right-clicked, it copies the text of the first cell. 

Please test with the attached sample project.

Completed
Last Updated: 08 Feb 2021 13:53 by ADMIN
Release R1 2021 SP2

Hi,

I have a RadVirtualGrid. I add a filter descriptor and then fetch the filtered data from the data store. I then clear the filters and perform a different fetch from the store. However, when I click in the filter value textbox the text from the previous filter operation is still there even though I purposely call radVirtualGrid.FilterDescriptors.Clear() prior to fetching the data from the store.

The filter text doesn't display in the filter row for the column where the filter was entered until I click in the text edit area.

How do I get rid of the text from the previous filter?

thanks,

Mike

Declined
Last Updated: 27 Jan 2021 13:39 by ADMIN

dear sir ,

i have a problem keydown event does not fire in add new row ?

i want to move to the next cell when i hit Enter key after entering new value and when i reach the last cell of the add new row and type enter the new row will automatically added to the grid....

what's i have to do.....

please any suggest ? thx

Completed
Last Updated: 23 Feb 2021 10:37 by ADMIN
Release R1 2021 SP2
1.The editor overlapping other cells after editing.

2. The arrow, that is actually meant to open the DropDown, cannot be clicked. Only the cell under it is clicked instead.
Unplanned
Last Updated: 19 Nov 2020 09:59 by ADMIN

Please run the attached sample project and navigate with the left/right arrows as it is demonstrated in the gif file.

Completed
Last Updated: 12 Jun 2020 16:00 by ADMIN
Release R2 2020 SP1

Please use the following code snippet and click the filter button for the first column in the virtual grid. You will notice that the default menu is shown:

        RadContextMenu menu = new RadContextMenu();
        public RadForm1()
        {
            InitializeComponent();
            RadDateTimePicker aDateTimePicker = new RadDateTimePicker();
            RadMenuItem theMenuItem = new RadMenuItem();
            theMenuItem.MinSize = new Size(200, 30);
            RadHostItem theHostItem = new RadHostItem(aDateTimePicker);
            theMenuItem.Children.Add(theHostItem); 
            menu.Items.Add(theMenuItem);
            this.radVirtualGrid1.RowCount = 50;
            this.radVirtualGrid1.ColumnCount = 5;
            this.radVirtualGrid1.CellValueNeeded+=radVirtualGrid1_CellValueNeeded;

            this.radVirtualGrid1.AllowFiltering = true;
            this.radVirtualGrid1.ContextMenuOpening+=radVirtualGrid1_ContextMenuOpening;
        }

        private void radVirtualGrid1_ContextMenuOpening(object sender, VirtualGridContextMenuOpeningEventArgs e)
        {
            int i;
            string theMenuItemText;

            if (e.RowIndex == -3 && e.ColumnIndex < 1)
            {
                e.ContextMenu = menu.DropDown; 
            }
        }

        private void radVirtualGrid1_CellValueNeeded(object sender, VirtualGridCellValueNeededEventArgs e)
        {
            e.Value = Guid.NewGuid().ToString();
        }

Completed
Last Updated: 03 Oct 2019 11:45 by ADMIN
Release R3 2019 SP1 (LIB 2019.3.1007)

To reproduce: 

Set the RowSpacing to 10. Press down until the last cell is selected. The view is not scrolled down. 

Completed
Last Updated: 03 Oct 2019 11:49 by ADMIN
Release R3 2019 SP1 (LIB 2019.3.1007)
Created by: n/a
Comments: 1
Category: VirtualGrid
Type: Bug Report
1

Hi,


I have a problem with the expansion of the last row.

After Row Expanding and Row Collapsing the last or second last row, the last row is not visible because it seems that there I some kind of lock on the scrollbar : it doesn’t scroll down neither with the mouse wheel nor with the button so it is not possible to move on the last row.

If instead you scroll up and then down the row became visible again.

In the attached example project.

 

Regards

 

 

 

Unplanned
Last Updated: 04 Jan 2021 15:45 by ADMIN
RadVirtualGrid shold automatically adjust the height of the visible cells/rows only. When you perform scrolling horizontally or vertically, the respective scrollbar will be adjusted. The scrollbar may shrink or enlarge considering the currently displayed data. Have in mind that when you have a horizontal scrollbar, the row's height will be calculated according to the content of the visible cells on the row. If you scroll horizontally and some of the cells on the row get hidden and others get visible, the row's height should be adjusted according to the content. Initially, this behavior may be confusing for the users, however since data is loaded on demand in RadVirtualGrid, you need to autosize the rows on demand as well. 
Unplanned
Last Updated: 16 May 2019 05:55 by ADMIN

Hello, we have found another small bug of the RadVirtualGrid control.

When paging is enabled on child view, one of the component of the paging panel overlap whit is parent.

I attach source code and screenshot.

 

Thanks in advance.

 

Completed
Last Updated: 14 Feb 2019 16:55 by ADMIN
Completed
Last Updated: 14 Feb 2019 16:42 by ADMIN

When you setup a hierarchical RadVirtualGrid and set the UseScrollbarsInHierarchy property to false and use VirtualGridAutoSizeColumnsMode.Fill for the child template, you expect that the column's width is calculated according to the total width of the respective template. Hence, if you shrink or enlarge the grid, the columns will shrink/enlarge respectively. However, if you double click the resize cursor between the column headers you will notice that the best-fit action is performed over the column and its width is adjusted. However, the VirtualGridAutoSizeColumnsMode.Fill setting is not respected and you either can't see all the columns, or you obtain some empty space if the column doesn't need much space.