Completed
Last Updated: 18 Oct 2016 10:19 by ADMIN
To reproduce:
DataTable table;
public RadForm1()
{
    InitializeComponent();
    table = GetTable();
    radGridView1.DataSource = table;

}

private void radButton1_Click(object sender, EventArgs e)
{
    var changes = table.GetChanges();

    if (changes == null)
    {
        Console.WriteLine("No Changes");
    }
    else
    {
        Console.WriteLine("Saved");

        foreach (DataRow item in changes.Rows) 
        {
            Console.WriteLine(item.RowState.ToString());
        }
    }

    table.AcceptChanges();
}
static DataTable GetTable()
{

    DataTable table = new DataTable();
    table.Columns.Add("Dosage", typeof(int));
    table.Columns.Add("Drug", typeof(string));
    table.Columns.Add("Name", typeof(string));
    table.Columns.Add("Date", typeof(DateTime));


    table.Rows.Add(25, "Indocin", "David", DateTime.Now);
    table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
    table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
    table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
    table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
    table.AcceptChanges();

    return table;
}

Workaround:
(this.radGridView1.CurrentRow.DataBoundItem as IEditableObject).EndEdit();
Completed
Last Updated: 18 Jul 2017 09:56 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
4
To reproduce: please refer to the attached sample project and gif file illustrating the behavior. Add cell value in the new row and press teh down arrow.

Workaround: this.radGridView1.MasterTemplate.SelectLastAddedRow = false;

This problem is applicable for OpenEdge as well: http://knowledgebase.progress.com/articles/Article/Telerik-RadGridView-highlights-unnecessary-columns-and-rows-in-batch-mode
Unplanned
Last Updated: 26 Mar 2018 11:38 by ADMIN
Use attached project to reproduce!

Another case is when the font size is changed from the settings dialog - in this case, the row height is not adjusted.

Workaround:
Use the following custom print style:

class MyTableViewDefinitionPrintRenderer : TableViewDefinitionPrintRenderer
{
    public MyTableViewDefinitionPrintRenderer(RadGridView grid) : base(grid)
    {

    }
    protected override int GetDataRowHeight(GridViewRowInfo row, TableViewRowLayoutBase rowLayout)
    {
        int result = base.GetDataRowHeight(row, rowLayout);

        int newHeight = 0;

        if (!(row is GridViewGroupRowInfo))
        {
            foreach (GridViewColumn col in row.ViewTemplate.Columns)
            {
                if (col is GridViewRowHeaderColumn || col is GridViewIndentColumn || !col.IsVisible)
                {
                    continue;
                }

                string value = row.Cells[col.Name].Value.ToString();

                TableViewCellArrangeInfo info = ((TableViewRowLayout)rowLayout).LayoutImpl.GetArrangeInfo(col);
                float cellWidth = (float)info.CachedWidth;
                int currentHeight = TextRenderer.MeasureText(value, this.GridView.PrintStyle.CellFont, new Size((int)cellWidth, 0), TextFormatFlags.WordBreak).Height + this.GridView.Font.Height *4;

                newHeight = Math.Max(newHeight, currentHeight);

            }
        }


        return Math.Max(newHeight, result); 
    }
}
class MyPrintStyle :GridPrintStyle
{
    protected override BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
    {
        return new MyTableViewDefinitionPrintRenderer(grid);
    }
}
Completed
Last Updated: 15 Aug 2017 10:29 by ADMIN
To reproduce:
        public Form1()
        {
            InitializeComponent();
            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Name", typeof(string));
            dt.Columns.Add("ParentId", typeof(int));

            for (int i = 0; i < 3; i++)
            {
                dt.Rows.Add(i, "Parent" + i, -1);
            }
            Random rand = new Random();
            for (int i = 3; i < 15; i++)
            {
                dt.Rows.Add(i,"Child"+i,rand.Next(0,3));
            }

            this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "Id", "ParentId");
            this.radGridView1.DataSource = dt;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radGridView1.EnableGrouping = true;
            this.radGridView1.EnableCustomGrouping = true;
            this.radGridView1.CustomGrouping+=radGridView1_CustomGrouping;
         }

private void radGridView1_CustomGrouping(object sender, GridViewCustomGroupingEventArgs e)
{
     
}
Completed
Last Updated: 25 Sep 2024 10:22 by ADMIN
Release 2024.3.924
How to reproduce: Create a DPI-aware application and run it on a Windows 10 machine on 125%, the text inside the editors is smaller compared to the text in cells which are not in edit mode.

Workaround: 
private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    BaseInputEditor editor = e.ActiveEditor as BaseInputEditor;

    if (editor != null)
    {
        RadTextBoxItem item = editor.EditorElement.FindDescendant<RadTextBoxItem>();

        if (item != null)
        {
            item.HostedControl.Font = this.radGridView1.GridViewElement.GetScaledFont(this.radGridView1.GridViewElement.DpiScaleFactor.Height);
        }
    }
} 
Completed
Last Updated: 27 Feb 2019 08:40 by ADMIN
To reproduce: please refer to the attached sample project and follow the steps from the attached gif file.

1. Run the project and type "hana" in the second filter cell. You will notice that after a few seconds the input is handled and the grid is filtered.

Workaround: use RadVirtualGrid instead. 
https://docs.telerik.com/devtools/winforms/virtualgrid/overview
https://docs.telerik.com/devtools/winforms/virtualgrid/filtering/filtering

Second workaround: https://docs.telerik.com/devtools/winforms/gridview/filtering/how-to/filter-on-enter
Unplanned
Last Updated: 29 Mar 2019 13:48 by ADMIN

How can I enter the Value "" (empty string) in the traditional filter system (not Excel like filter).

The grid does not seem to accept an empty string as an argument to "Equals" through the UI.

Ideally I would like to extend the standard filter menu in traditional filtering (and the filter operator drop down in custom filtering dialog) to contain operators "Is Empty" "Is Not Empty" and "Is Null Or Empty", "Is Not Null And Not Empty"

Regards

Erwin

Completed
Last Updated: 01 Jun 2022 13:37 by ADMIN
Release R2 2022 SP1
Created by: Roger
Comments: 3
Category: GridView
Type: Feature Request
4

I might be missing something, but I have Hyperlinks in a column in my RadDatGridView.

 

I tried searching for a Support document explaining this, but didn't find any.

 

When the grid is exported to excel all data is coming across, but the column with hyperlink is not

a hyperlink in Excel.

 

Below is sample of the code used to make the "HyperLink" column in my grid.

                radGridView1.DataSource = dtResults;
                radGridView1.Columns.Remove("Path");
                GridViewHyperlinkColumn col = new GridViewHyperlinkColumn();
                radGridView1.Columns.Insert(5, col);
                col.Width = 200;
                col.FieldName = "Path";
                col.HeaderText = "Path";
                col.Name = "Path";

 

Coded used to do the Export....

               GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
                spreadExporter.ExportVisualSettings = true;
                SpreadExportRenderer exportRenderer = new SpreadExportRenderer();

                spreadExporter.RunExport(filename, exportRenderer);

 

Thanks.

 

Roger

Completed
Last Updated: 07 Jul 2020 08:23 by ADMIN
Release R3 2020 (LIB 2020.2.713)

Hello,

We are experiencing a strange behaviour of RadGridView set as a self referencing hierarchy when used with Excel filters.

Once we use predefined filter values (both, build-in and custom defined by us) the filter icon is highlitghted when none of the filter is marked. This higlight can be removed when clear filters button of filter popup is used or FilterDescriptors are cleared. If we do not clear the filters manually, and, for instance, sort grid column the application crashes with internal error of the grid. Error reads Object reference not set to an instance of object.

Attached movie will explain it better. I have also attached a ver simple sample project with data (which does not make sense, just for visualisation) that should fail when you repeat steps described above (turn today or last 7 days filter, apply, select no filter, apply and try to sort the same column).

Is there a workaround or specific conditions we need to apply to have it working?

Thanks for your advice.

I'm also attaching errors details:

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of object. /this message comes in Polish, translated
  Source=Telerik.WinControls.GridView
  StackTrace:
   at Telerik.WinControls.UI.GridViewTemplate.PerformHierarchyFilter(GridViewRowInfo rowInfo)
   at Telerik.WinControls.Data.RadCollectionView`1.PassesFilter(TDataItem item)
   at Telerik.Collections.Generic.HybridIndex`1.GetFilteredItems(IEnumerable`1 e)
   at Telerik.Collections.Generic.HybridIndex`1.PerformWithQuickSort()
   at Telerik.Collections.Generic.HybridIndex`1.Perform()
   at Telerik.Collections.Generic.HybridIndex`1.get_Items()
   at Telerik.Collections.Generic.Index`1.get_Count()
   at Telerik.WinControls.Data.GroupBuilder`1.get_Groups()
   at Telerik.WinControls.Data.SnapshotCollectionView`1.get_Groups()
   at Telerik.WinControls.UI.GridViewInfo.LoadHierarchicalData(GridViewHierarchyRowInfo parent, ICollectionView`1 sourceView)
   at Telerik.WinControls.UI.GridViewInfo.Refresh()
   at Telerik.WinControls.UI.GridViewInfo.get_ChildRows()
   at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
   at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
   at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
   at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   at Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
   at Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
   at Telerik.WinControls.Data.RadDataView`1.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
   at Telerik.WinControls.Data.RadCollectionView`1.OnNotifyPropertyChanged(String propertyName)
   at Telerik.WinControls.Data.RadCollectionView`1.sortDescriptors_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.WinControls.UI.GridViewSortDescriptorCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Collections.Generic.NotifyCollection`1.InsertItem(Int32 index, T item)
   at Telerik.WinControls.Data.SortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
   at Telerik.WinControls.UI.GridViewSortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at Telerik.WinControls.UI.GridViewColumn.Sort(RadSortOrder sortOrder, Boolean multiSortMode)
   at Telerik.WinControls.UI.GridHeaderCellElement.Sort(RadSortOrder sortOrder)
   at Telerik.WinControls.UI.GridHeaderRowBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)
   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)
   at Telerik.WinControls.UI.RadGridView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at bindingListEx_celLike.My.MyApplication.Main(String[] Args) in :line 81

Completed
Last Updated: 28 May 2015 06:47 by Svetlin
Workaround: use the following custom editor:

using System;
using Telerik.WinControls.UI;

namespace radGridView_MultipleFilters
{
    public class CustomRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement
    {
        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(RadMultiColumnComboBoxElement);
            }
        }

        public GridViewDataColumn DisplayColumn
        {
            get
            {
                string displayMember = this.DisplayMember;
                if (string.IsNullOrEmpty(displayMember))
                {
                    for (int i = 0; i < this.MultiColumnPopupForm.EditorControl.Columns.Count; i++)
                    {
                        if (this.MultiColumnPopupForm.EditorControl.Columns[i].DataType == typeof(string))
                        {
                            displayMember = this.MultiColumnPopupForm.EditorControl.Columns[i].FieldName;
                            break;
                        }
                    }
                    if (this.MultiColumnPopupForm.EditorControl.Columns.Count > 0
                        && string.IsNullOrEmpty(displayMember))
                    {
                        displayMember = this.MultiColumnPopupForm.EditorControl.Columns[0].FieldName;
                    }
                }
                DisplayMember = displayMember;
                GridViewDataColumn[] columns = this.MultiColumnPopupForm.EditorControl.Columns.GetColumnByFieldName(displayMember);
                if (columns.Length > 0)
                {
                    return columns[0];
                }
                return null;
            }
        }

        protected override object FindItemExact(string text)
        {
            int index = this.FindItemIndexExact(text);

            if (index != -1)
            {
                return this.EditorControl.ChildRows[index];
            }

            return null;
        }

        protected override void SetActiveItem(string text)
        {
            int rowIndex = this.FindItemIndexExact(text);

            if (rowIndex != -1)
            {
                this.EditorControl.CurrentRow = this.EditorControl.ChildRows[rowIndex];
                this.Select(this.Text.Length, 0);
            }
        }

        protected override int FindItemIndexExact(string text)
        {
            GridViewRowInfo rowInfo = this.FindItemExact(text, this.DisplayColumn.Name);

            if (rowInfo != null)
            {
                return rowInfo.Index;
            }

            return -1;
        }

        protected override GridViewRowInfo FindItemExact(string text, string field)
        {
            GridViewDataColumn[] foundColumns = this.EditorControl.Columns.GetColumnByFieldName(field);
            if (foundColumns.Length > 0)
            {
                for (int i = 0; i < this.EditorControl.ChildRows.Count; i++)
                {
                    object element =
                        this.EditorControl.ChildRows[i].Cells[foundColumns[0].Name].Value;

                    string elementText = Convert.ToString(element);

                    if (!string.IsNullOrEmpty(elementText) && elementText.Equals(text,
                        this.EditorControl.MasterTemplate.CaseSensitive ? StringComparison.InvariantCulture : StringComparison.InvariantCultureIgnoreCase))
                    {
                        return this.EditorControl.ChildRows[i];
                    }
                }
            }
            return null;
        }
    }
}
Completed
Last Updated: 08 Jan 2016 08:32 by ADMIN
If you have your grid bound to a table with a single string column, changing the DataType of the resulted column in RadGridView to int, should change the way the column is sorted.
Completed
Last Updated: 22 Apr 2014 00:22 by Matt
IMPROVE. RadGridView - when sorting grouped combo box column the DisplayMemberSort is not taken into consideration
Completed
Last Updated: 01 Jun 2015 08:36 by ADMIN
When a Right-To-Left grid is printed the text of all print cells should be drawn with the StringFormatFlags.DirectionRightToLeft.

Example:
RadGridView with RightToLeft set to Yes
A decimal column with negative values
the values in the decimal column are drawn as 96-, 88- etc
if this grid is printed the values will be -96, -88

Workaround: http://www.telerik.com/community/forums/radprintdocument-from-a-grid-wrong-format-when-right-to-left-true-in-grid
Unplanned
Last Updated: 29 Mar 2016 14:31 by ADMIN
When one exports a grid with text written in right-to-left the exported file has all text written in left-to-right.
Completed
Last Updated: 28 Jan 2013 05:15 by ADMIN
ADMIN
Created by: Anton
Comments: 0
Category: GridView
Type: Feature Request
3
Implement "Tag" and "Name" properties into the GridViewColumnGroup.
Completed
Last Updated: 13 Oct 2014 09:53 by Jesse Dyck
RadGridView is throwing exception when loading layout that contains a GroupDescriptor with predefined Format with Aggregate function.

Steps to reproduce:

1. Add GroupDescriptor:
        Dim descriptor As New GroupDescriptor
        descriptor.GroupNames.Add("column3", System.ComponentModel.ListSortDirection.Ascending)
        descriptor.Aggregates.Add("Sum(column3)")
        descriptor.Format = "{0}: {1} Total montant : {2:c2}"
        Me.RadGridView1.GroupDescriptors.Add(descriptor)
2. Save Layout
3. Load Layout
Unplanned
Last Updated: 15 Aug 2017 09:36 by ADMIN
When the pencil icon is clicked the RowValidating event must be fired.

WORKAROUND:
1. When clicking the "pencil" icon, the current row is not changed, thus the RowValidating is not fired. A suitable event to cover this case is the CellValidating event which will be triggered when the "pencil" icon is clicked. 
2. When the pencil is clicked, save the grid's CurrentRow, set it to null and then set it back to the saved row. This will trigger the RowValidating event and the desired logic will be executed. The downside of this approach is that the event will be triggered twice, because we change the CurrentRow twice.


void radGridView1_MouseDown(object sender, MouseEventArgs e)
{
    GridRowHeaderCellElement rowHeader = radGridView1.ElementTree.GetElementAtPoint(e.Location) as GridRowHeaderCellElement;
    if (rowHeader != null)
    {
        GridViewRowInfo saveRow = radGridView1.CurrentRow;
        radGridView1.CurrentRow = null;
        radGridView1.CurrentRow = saveRow;
    }
}
Completed
Last Updated: 23 Apr 2014 12:56 by Jesse Dyck
ADMIN
Created by: Martin Vasilev
Comments: 1
Category: GridView
Type: Feature Request
3
Add support for drag and drop operations in column chooser when ColumnGroup view is applied.
Completed
Last Updated: 21 Aug 2015 11:37 by ADMIN
Allow changing the header row height when RadGridView is set to ColumnGroupsViewDefinition.