Unplanned
Last Updated: 01 Mar 2023 15:23 by ADMIN

When the GridViewComboBoxColumn is added for the master level, once the FieldName property is set, the DataType is synced with its type:

However, for the child levels, this logic is not executed automatically.

 

Unplanned
Last Updated: 01 Mar 2023 14:00 by ADMIN

Steps to reproduce:

1. Add a RadGridView with AutoGenerateHierarchy set to true.

2. Set the DataSource to Northwind DataSet and DataMember to Categories:

3. Open the grid's Property Builder and add a combo column for the child level:

4. Set the column's DataSource property.


Expected behavior: DataSource collection is properly set:

Actual behavior: blank property grid with settings for the column:

 

Unplanned
Last Updated: 27 Feb 2023 10:03 by ADMIN
Created by: Paul
Comments: 1
Category: GridView
Type: Bug Report
0

When paging is enabled in RadGridView and a row is pinned, it is visible among all pages. However, it is possible to paste in it only from the page to which it originally belongs.

Use the following setup: 

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Name", typeof(string));
            for (int i = 0; i < 100; i++)
            {
                dt.Rows.Add(i, "Row" + i);
            }
            this.radGridView1.DataSource = dt;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.EnableWithNotifications;

            this.radGridView1.EnablePaging = true;

1. Copy the entire content of a random row

2. Navigate to another page and pin a row

3. Change the page and try to paste the clipboard content to the pinned row

Expected behavior: the content is successfully pasted no matter of the current page

Actual behavior: the content is pasted only if the use navigates to the page to which the pinned row originally belongs

Unplanned
Last Updated: 27 Feb 2023 09:52 by ADMIN

Use the following setup:

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Name", typeof(string));
            for (int i = 0; i <5; i++)
            {
                dt.Rows.Add(i, "Row"+i);
            }
            this.radGridView1.DataSource = dt;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.Enable;

1. Copy the entire content of a random row.

2. Pin another row to the top

3. Paste the clipboard data to the pinned row

Expected result: the content is successfully pasted in the pinned row.

Observed result: the pinned row disappears.

Unplanned
Last Updated: 17 Jan 2023 12:51 by ADMIN

In this case, we have GridViewTextBoxColumn and GridViewComboBoxColumn after it. We want to trigger the edit on the second column at the moment it is navigated with the key arrow navigation. To do that BeginEdit() method is called. However, manually calling this method will trigger key events on the editor inside the GridViewComboBoxColumn which will bubble to the parent and move the current cell to the next column (skipped the GridViewComboBoxColumn )

This behavior could be workaround by delaying the execution of the BeginEdit() method.

public class CustomGridBehavior : BaseGridBehavior
{
    Timer timer = new Timer();        
    public override bool ProcessKey(KeyEventArgs keys)
    {
        var result = base.ProcessKey(keys);
        if((keys.KeyCode == Keys.Left || keys.KeyCode == Keys.Right) && this.GridControl.CurrentColumn is GridViewComboBoxColumn)
        {
            timer.Interval = 100;
            timer.Tick += Timer_Tick;
            timer.Start();                
        }
        return true;
    }

    private void Timer_Tick(object sender, EventArgs e)
    {
        timer.Stop();
        this.GridControl.BeginEdit();
    }
}

this.radGridView1.GridBehavior = new CustomGridBehavior();

 

Unplanned
Last Updated: 11 Jan 2023 08:25 by ADMIN

To reproduce:

1.Open the Demo application >> VirtualGrid >> First Look example and resize a column.

2.Then, move the form to a monitor with higher than 100% DPI scale factor.

Expected: the columns' width settings should be preserved.

Actual: the columns' width settings got reset.

Unplanned
Last Updated: 28 Oct 2022 12:36 by Daniel

In this case, the GridViewCheckBoxColumn is nullable bool? property and the ThreeState property is set to true. When we try to use the filter context menu to filter the cell by null values, the filter is not applied.

Unplanned
Last Updated: 25 Oct 2022 09:03 by ADMIN

Steps to reproduce:

1. Please run the attached sample project

2. Filter grid so only one row is left

3.Copy the first cell with the content menu. The following error occurs:

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Telerik.WinControls.UI.MasterGridViewTemplate.CopySelected(GridViewCellInfo[] cells, String format, Boolean cut, Boolean cutOperation, StringBuilder content) in C:\Work\Development\RadControls\RadGridView\Code\Data\MasterGridViewTemplate.cs:line 1491
   at Telerik.WinControls.UI.MasterGridViewTemplate.ProcessContent(String format, Boolean cut, Boolean cutOperation) in C:\Work\Development\RadControls\RadGridView\Code\Data\MasterGridViewTemplate.cs:line 1291
   at Telerik.WinControls.UI.MasterGridViewTemplate.CopyContent(Boolean cut) in C:\Work\Development\RadControls\RadGridView\Code\Data\MasterGridViewTemplate.cs:line 1256
   at Telerik.WinControls.UI.MasterGridViewTemplate.Copy() in C:\Work\Development\RadControls\RadGridView\Code\Data\MasterGridViewTemplate.cs:line 2066
   at Telerik.WinControls.UI.GridDataCellElement.ItemCopy_Click(Object sender, EventArgs e) in C:\Work\Development\RadControls\RadGridView\Code\UI\GridViews\TableView\Cells\GridDataCellElement.cs:line 380
   at Telerik.WinControls.RadElement.OnClick(EventArgs e) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadElement.cs:line 5096
   at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e) in C:\Work\Development\RadControls\RadControlsUI\UIElements\Buttons\RadButtonItem.cs:line 566
   at Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e) in C:\Work\Development\RadControls\RadControlsUI\Menu\RadMenuItem.cs:line 685
   at Telerik.WinControls.RadElement.DoClick(EventArgs e) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadElement.cs:line 5160
   at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadElement.cs:line 4274
   at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadItem.cs:line 779
   at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadElement.cs:line 4181
   at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadElement.cs:line 5273
   at Telerik.WinControls.RadElement.CallDoMouseUp(MouseEventArgs e) in C:\Work\Development\RadControls\RadControl\TPF\Element\RadElement.cs:line 5495
   at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e) in C:\Work\Development\RadControls\RadControl\TPF\Control\ComponentInputBehavior.cs:line 75
   at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e) in C:\Work\Development\RadControls\RadControl\TPF\Control\RadControl.cs:line 1206
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m) in C:\Work\Development\RadControls\RadControl\TPF\Control\RadControl.cs:line 1550
   at Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m) in C:\Work\Development\RadControls\RadControlsUI\GenericPopup\RadPopupControlBase.cs:line 795
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Unplanned
Last Updated: 19 Sep 2022 07:58 by Ark Technologies
When the Space key is pressed GridCheckBoxCellElement enters edit mode although the EditMode property is set to OnValueChange. 
Unplanned
Last Updated: 05 Apr 2024 11:00 by ADMIN

Run the attached project on a monitor with 100% DPI scaling and open the Excel-like filter popup:

100%:

After moving the form to the second monitor with 150% DPI scaling, the filter popup is not OK:

150%:

The popup is smaller and smaller with each next opening (see the attached gif file) at 150%. If you decide to move back the form on the monitor with 100% DPI scaling, the filter popup is not scaled properly.

Unplanned
Last Updated: 08 Jun 2022 07:52 by Suresh

Use the following code snippet:

        public RadForm1()
        {
            InitializeComponent();
            this.radGridView1.Columns.Add("TextColumn");
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

            for (int i = 0; i < 30; i++)
            {
                this.radGridView1.Rows.Add(Guid.NewGuid().ToString());
            }
            this.radGridView1.CellValidating += radGridView1_CellValidating;

            this.radGridView1.EditorManager.CloseEditorWhenValidationFails = false;
        }

        private void radGridView1_CellValidating(object sender, CellValidatingEventArgs e)
        {
            if (e.Value == null || e.Value == "")
            {
                e.Cancel = true;
                RadMessageBox.Show("Value can't be empty!");
            }
        }

Steps:

1. Clear the value of a cell

2. While the editor is active with an empty value, click the vertical scrollbar to trigger scrolling.

Actual: the scrolling is performed and the editor is closed with the previous value no matter when the validation fails and the CloseEditorWhenValidationFails property is set to false.

Expected: the scrolling should be blocked if the validation fails. We should offer the same behavior when scrolling with the mouse wheel, clicking another cell or clicking the vertical scrollbar (or any of its elements).

Workaround: 

        public class MyGrid : RadGridView
        {
            public override string ThemeClassName
            {
                get
                {
                    return typeof(RadGridView).FullName;
                }
            }

            protected override void OnMouseDown(MouseEventArgs e)
            {
                RadScrollBarElement scrollBarAtPoint = GetScrollbarElementAtPoint<RadScrollBarElement>(this.GridViewElement.ElementTree, e.Location) as RadScrollBarElement;
                GridViewEditManager editManager = this.EditorManager;
                if (scrollBarAtPoint != null && this.ActiveEditor != null && !editManager.CloseEditorWhenValidationFails)
                {
                    bool isClosed = editManager.CloseEditor();
                    if (!isClosed)
                    {
                        return;
                    }
                }
                base.OnMouseDown(e);
            }

            internal T GetScrollbarElementAtPoint<T>(RadElementTree componentTree, Point point) where T : RadElement
            {
                if (componentTree != null)
                {
                    RadElement elementUnderMouse = componentTree.GetElementAtPoint(point);

                    while (elementUnderMouse != null)
                    {
                        T item = elementUnderMouse as T;

                        if (item != null)
                        {
                            return item;
                        }

                        elementUnderMouse = elementUnderMouse.Parent;
                    }
                }

                return null;
            }
        }

 

 

Unplanned
Last Updated: 25 Jan 2022 09:46 by ADMIN
The attached gif file illustrates the current behavior. Pressing Enter while editing the criteria nodes tries to submit the filter dialog even though the filter expression may not be valid.
Unplanned
Last Updated: 09 Dec 2021 14:57 by ADMIN

Use the following code snippet:

public RadForm1()
{
    InitializeComponent();

    GridViewDecimalColumn idColumn = new GridViewDecimalColumn("Id");
    this.radGridView1.Columns.Add(idColumn);
    GridViewTextBoxColumn nameColumn = new GridViewTextBoxColumn("Name");
    this.radGridView1.Columns.Add(nameColumn);
    GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn("Date");
    dateColumn.FilteringMode = GridViewTimeFilteringMode.Date;
    dateColumn.Format = DateTimePickerFormat.Custom;
    dateColumn.CustomFormat = "dd/MM/yyyy";
    dateColumn.FormatString = "{0:dd/MM/yyyy}";
    this.radGridView1.Columns.Add(dateColumn);
    this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

    for (int i = 0; i < 50; i++)
    {
        this.radGridView1.Rows.Add(i,"Row"+i,DateTime.Now.AddDays(i));
    }

    this.radGridView1.EnableFiltering = true;
    this.radGridView1.ShowHeaderCellButtons = true;
    this.radGridView1.ShowFilteringRow = false;

    this.radGridView1.FilterExpressionChanged += RadGridView1_FilterExpressionChanged;
}

private void RadGridView1_FilterExpressionChanged(object sender, FilterExpressionChangedEventArgs e)
{
    Console.WriteLine(e.FilterExpression);
}

 If I use the calendar control then the sequence works:

Click the filter button
Click Available filters
Click Equals
Click the calendar button in the value field
Click on December 10, 2021

But if I do not use the calendar control then it does not work. This sequence produces no results:

Click the filter button
Click Available filters
Click Equals
Click on the day component of the value field
Type in 10
Click OK

Workaround:

        private void RadGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e)
        {
            e.Dialog = new CustomCompositeDataFilterForm();
        }

        public class CustomCompositeDataFilterForm : CompositeDataFilterForm
        {
            protected override void OnClosing(CancelEventArgs e)
            {
                base.OnClosing(e);
                if (GridFilterCellElement.ValidateUserFilter(this.FilterDescriptor))
                {
                    CompositeFilterDescriptor cfd = this.FilterDescriptor as CompositeFilterDescriptor;
                    if (cfd != null)
                    {
                        foreach (FilterDescriptor fd in cfd.FilterDescriptors)
                        {
                            TrimTimePart(fd);
                        }
                    }
                    else
                    {
                        TrimTimePart(this.FilterDescriptor);
                    }
                   
                }
            }

            private void TrimTimePart(FilterDescriptor filterDescriptor)
            {
                CompositeFilterDescriptor cfd = filterDescriptor as CompositeFilterDescriptor;
                if (cfd != null)
                {
                    foreach (FilterDescriptor fd in cfd.FilterDescriptors)
                    {
                        TrimTimePart(fd);
                    }
                }
                else
                {
                    DateTime dateValue = DateTime.MinValue;
                    if (DateTime.TryParse(filterDescriptor.Value + "", out dateValue))
                    {
                        dateValue = dateValue.Date;
                       filterDescriptor.Value = dateValue;
                    }
                }
            }
        }

Unplanned
Last Updated: 17 Apr 2024 14:44 by ADMIN

Follow the steps:

1.Group by Description.

2. Expand the groups

3. Sort by Id

4. Try expanding the hierarchical level. You will notice that some of the rows disappear.

Please refer to the attached gif file illustrating the steps for replicating the issue.

Unplanned
Last Updated: 28 Oct 2021 14:07 by Rune Toft

There are situations where SelectedRows won't return the number of rows preselected when using Begin/EndUpdate even though it seems like there's a row selected in the UI. By preselected I mean the row that looks selected after the rows has been added. This bug has caused some problems for us because the user tried some action on a row they thought was preselected and it would fail.

One situation I found where this bug can be reproducted is by using SortOrder in combination of Begin/EndUpdate. There are probably more situations but I hope this one will let you find the underlying bug.

The attached project contains a simple form with a RadGridView which will contain a list of persons. The list is populated by this method:

public void PopulateGridView(List<Person> persons)
{
	PersonGridView.BeginUpdate();
	PersonGridView.DataSource = persons;
	PersonGridView.EndUpdate();
	PersonGridView.Columns[nameof(Person.LastName)].SortOrder = RadSortOrder.Ascending;
}

There are two buttons: "Step one" and "Step two". The first will mimick a situation where the user search a database for persons and none will be found. By clicking the "Get selected rows" you will see that the SelectedRows will return zero rows which is correct.
But when you afterwards click "Step two" (which will add five rows) it seems like there's one row preselected. I would expect the SelectedRows to return that row but by clicking "Get selected rows" again you will see that the returned rows are zero still. The CurrentRow, however is set to the preselected row as expected.
If you start by clicking "Step two" the SelectedRows actually returns the correct rows. Quite strange :-)

I know this is a very small issue and can be avoided. But as I mentioned there are other situations where this problem occurs and it's quite hard to figure out exactly what causes it.

Thank you for your help.

Best regards
Ulrik Skovenborg

Unplanned
Last Updated: 07 Oct 2021 10:12 by ADMIN
Created by: Ben
Comments: 0
Category: GridView
Type: Bug Report
1

Please run the attached sample project. The row's height in the print document is not adjusted according to the column's width in the print page. 

Workaround: 

Usually for such cases it is convenient to increase the column's width in order to reduce its height and thus it would be able to fit the print page's height. In addition to adjusting the column's width, feel free to use multi-page printing:

https://docs.telerik.com/devtools/winforms/controls/gridview/printing-support/gridprintstyle#multi-page-printing   

 

Unplanned
Last Updated: 20 Apr 2021 15:19 by ADMIN
Good Afternoon,

I have a problem with radgridview :

grouping the column (GRP) of child template the summary row contains the correct data (12 RowCount for 62,40 summary), but if I try to sort a column and / or click on the summary row the datas is modified, the RowCount number becomes the total number of groups (4) and the amounts are reset (0,00).

Looking forward to your kind reply, I offer you my best regards.
Unplanned
Last Updated: 17 Apr 2024 14:40 by ADMIN

Steps to reproduce:

1. Bind the grid to BindingList

2. Call BestFitColumns method in form's constructor

3. Use Fluent/Crystal theme

4. Rebind the grid by setting DataSource=null

5. Exception is thrown

Stack trace:

en Telerik.WinControls.UI.BestFitHelper.SetColumnWidth(GridViewColumn column, Single desiredWidth)
   en Telerik.WinControls.UI.BestFitHelper.BestFitColumnCore(GridViewColumn column, BestFitColumnMode mode)
   en Telerik.WinControls.UI.BestFitHelper.ProcessRequests()
   en Telerik.WinControls.UI.GridTableElement.UpdateAll()
   en Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
   en Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
   en Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
   en Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
   en Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
   en Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
   en Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
   en Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
   en Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
   en Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
   en Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
   en Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
   en Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   en Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   en Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   en Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
   en Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
   en Telerik.WinControls.Data.RadDataView`1.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   en Telerik.WinControls.Data.RadCollectionView`1.source_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.RadListSource`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.RadListSource`1.EndUpdate(Boolean notifyUpdates)
   en Telerik.WinControls.Data.RadListSource`1.Initialize()
   en Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
   en Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
   en Telerik.WinControls.UI.GridViewTemplate.set_DataSource(Object value)
   en Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)

Unplanned
Last Updated: 06 Aug 2020 09:38 by ADMIN

Please refer to the attached sample project. 

If the main Cars list is not empty, the child templates have correct captions:

However, if initially there are no Cars and you add a new one via the new row, the captions of the child template remains with the default value ("table"):

Unplanned
Last Updated: 17 Apr 2024 14:43 by ADMIN

Hi

Please find attached sample project having 2 different reference folder(Telerik2018,Telerik2020) for Telerik.

Code flow & Issue description: I have Event "radGridView1_EditorRequired" in which i have attached another event on value changed "Editor_ValueChanged" in which we get data gron DropdownListElement using ((RadDropDownListElement)(sender)).SelectedValue.
Issue is when we use version (2018.3.1016.40) we get selected value text, in case of current version (2020.1.218.40) we get null value.

Current version DLL  2020.1.218.40 (Issue in current version)
Previous version DLL 2018.3.1016.40 (Working fine)

Note : I have also attached both version of Telerik DLL in sample project, you can reproduce issue by referencing to 2020.1.218.40 version. After selecting values as shown in attached screenshot you will get null value as shown in another screenshot.

Please find attached screenshot  for selecting values to reproduce issue as well where we get null value.

 

Thanks and Regards