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
Completed
Last Updated: 13 Jun 2018 08:48 by Dimitar
To reproduce:
private void MasterTemplate_ViewChanged(object sender, DataViewChangedEventArgs args)
{
    if (args.Action == ViewChangedAction.ExpandedChanged)
    {

    }
}
Workaround:
- Use the GroupExpanded event.
Completed
Last Updated: 18 May 2017 13:01 by ADMIN
To reproduce:
- Add default values for all cells in the grid.
- Try to add the new row without changing any value.

Workaround:
private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    var editor = radGridView1.ActiveEditor as BaseInputEditor;
    var field = editor.GetType().GetField("originalValue", BindingFlags.NonPublic | BindingFlags.Instance);
    field.SetValue(editor, "asd");
}
Completed
Last Updated: 19 Jun 2017 12:07 by ADMIN
To reproduce:
- Add DateTime columns to the grid and set the MaskType of the editor to FreeFormDateTime.
- Go to the new row enter a valid date and press Tab.

Workaround:
class Myditor : RadDateTimeEditor
{
    public override bool IsModified
    {
        get
        {
            return true;

        }
    }
}
Completed
Last Updated: 26 Apr 2017 11:59 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
1
Please refer to the attached sample project and gif file illustrating the problem.

Workaround:
Sub New() 
    InitializeComponent()
    AddHandler Me.RadGridView1.CreateCell, AddressOf RadGridView_CreateCell
End Sub

Public Class CustomGridFilterCellElement
Inherits GridFilterCellElement
    
    Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
        Get
            Return GetType(GridFilterCellElement)
        End Get
    End Property
    Public Sub New(column As GridViewDataColumn, row As GridRowElement)
        MyBase.New(column, row)
    End Sub

    Protected Overrides Function ApplyFormatString(value As Object) As String
        Return CDate(value).ToString("dd.MM.yyyy")
    End Function
End Class
Completed
Last Updated: 19 Jun 2017 12:06 by ADMIN
To reproduce:

this.Controls.Add(this.radGridView1);
this.radScheduler1.Dock = DockStyle.Fill;

List<GridRec> records = new List<GridRec>();
GridRec rec = new GridRec();
rec.Column1 = "1";
rec.Column2 = "2";
rec.Column3 = "3";
rec.Column4 = "4";
rec.Column5 = "5";
rec.Column6 = "6";
rec.Column7 = "7";
rec.Column8 = "8";
rec.Column9 = "9";

for (int i = 0; i < 20; ++i)
{
    records.Add(rec.Clone());
}

radGridView1.DataSource = records;
this.radGridView1.MultiSelect = true;
this.radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;
this.radGridView1.Dock = DockStyle.Fill;

public class GridRec
{
    public GridRec Clone()
    {
        return this.MemberwiseClone() as GridRec;
    }

    public string Column1 { get; set; }

    public string Column2 { get; set; }

    public string Column3 { get; set; }
    
    public string Column4 { get; set; }

    public string Column5 { get; set; }

    public string Column6 { get; set; }

    public string Column7 { get; set; }

    public string Column8 { get; set; }

    public string Column9 { get; set; }
}

If you run the application, it starts with the upper-left most cell selected.  Now, while holding down the Shift key, left-click on the cell in the 5th column of the 5th row (cell 5:5).  Note all 25 cells are selected as expected.  Now, while still holding Shift, left-click again on cell 5:5 and note the selection is cleared.
Now, while still holding Shift, click on cell 4:4 (4th column, 4th row).  Note how the selected range is now cells 1:1 through 4:4.  And while still holding Shift, if you click on 4:4 yet again, the selection is cleared.

Workaround: 

private void radGridView1_SelectionChanging(object sender, Telerik.WinControls.UI.GridViewSelectionCancelEventArgs e)
{
    if (e.ColumnStartIndex == e.ColumnEndIndex && Control.ModifierKeys == Keys.Shift)
    {
        e.Cancel = true;
    }
}
Completed
Last Updated: 15 Mar 2017 10:28 by ADMIN
Steps to reproduce:

1. Add a CompositeFilterDescriptor programmatically as it is demonstrated in the following help article: http://docs.telerik.com/devtools/winforms/gridview/filtering/setting-filters-programmatically-(composite-descriptors)
2. Save the layout.
3. Load the layout.

Use attached project to reproduce.

Workaround:
Seth te PropertyName to a valid column name.
Completed
Last Updated: 16 Jan 2017 13:26 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce:

DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("IsActive", typeof(bool));

dt.Rows.Add(1, "Parent1", false);
dt.Rows.Add(2, "Parent2", false);

this.radGridView1.DataSource = dt;
((GridViewCheckBoxColumn)this.radGridView1.MasterTemplate.Columns["IsActive"]).EnableHeaderCheckBox = true;
this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

DataTable childDataTable = new DataTable();
childDataTable.Columns.Add("Id", typeof(int));
childDataTable.Columns.Add("Title", typeof(string));
childDataTable.Columns.Add("ParentId", typeof(int));            
childDataTable.Columns.Add("IsValid", typeof(bool));
childDataTable.Rows.Add(1, "Child 1", 1, false);
childDataTable.Rows.Add(2, "Child 1", 1, false);
childDataTable.Rows.Add(3, "Child 2", 2, false);
childDataTable.Rows.Add(4, "Child 2", 2, false);

GridViewTemplate template = new GridViewTemplate();
template.DataSource = childDataTable;            
((GridViewCheckBoxColumn)template.Columns["IsValid"]).EnableHeaderCheckBox = true;
radGridView1.MasterTemplate.Templates.Add(template);
template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
relation.ChildTemplate = template;
relation.RelationName = "MasterDeatial";
relation.ParentColumnNames.Add("Id");
relation.ChildColumnNames.Add("ParentId");
radGridView1.Relations.Add(relation);
Completed
Last Updated: 11 Jan 2017 10:55 by ADMIN
The GridViewCheckBoxColumn.EditMode property controls when the value of the editor will be submitted to the cell. By default, the value is OnValidate and the value will be submitted only when the current cell changes, the grid looses focus or the active editor is closed by pressing Enter. If you set the EditMode property to OnValueChange it will submit the value immediately after the editor value changes. Please refer to the attached gif files illustrating the difference between the two modes.

To reproduce: if you set the GridViewCheckBoxColumn.EnableHeaderCheckBox property to true, the cell value is always submitted immediately after toggle/untoggle the checkbox without considering that EditMode.OnValidate is used.
Completed
Last Updated: 26 Jan 2017 11:21 by ADMIN
How to reproduce: 
 public partial class Form1 : Form
 {
     public Form1()
     {
         InitializeComponent();
         GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn();
         decimalColumn.Name = "DecimalColumn";
         decimalColumn.HeaderText = "DecimalColumn";
         this.radGridView1.MasterTemplate.Columns.Add(decimalColumn);

         GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn();
         textBoxColumn.Name = "TextBoxColumn";
         textBoxColumn.HeaderText = "TextBoxColumn";
         this.radGridView1.MasterTemplate.Columns.Add(textBoxColumn);

         GridViewDateTimeColumn dateTimeColumn = new GridViewDateTimeColumn();
         dateTimeColumn.Name = "DateTimeColumn";
         dateTimeColumn.HeaderText = "DateTimeColumn";
         this.radGridView1.MasterTemplate.Columns.Add(dateTimeColumn);
     }
 }

Workaround: this.radGridView1.MasterView.TableAddNewRow.MinHeight = 30;
Completed
Last Updated: 04 Jan 2017 15:58 by ADMIN
When the EnableHeaderCheckBox property is set to true, whenever the checkbox is clicked in the new row, a new row is actually added to the grid before any other modifications are made. This can be replicated in the attached sample project. Run it and click the checkbox in the new row several times. Multiple rows are added.  

Workaround: cancel the RadGridView.UserAddingRow until all the required fields are filled.
Completed
Last Updated: 06 Jan 2017 08:15 by ADMIN
To reproduce: 

public Form1()
{
    InitializeComponent();
     
    DataTable dt = new DataTable();
    dt.Columns.Add("Id");
    dt.Columns.Add("Name");
    for (int i = 0; i < 1; i++)
    {
        dt.Rows.Add(i, "Item");
    }
    this.radGridView1.DataSource = dt;
    this.radGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect;
    this.radGridView1.ClipboardCopyMode = Telerik.WinControls.UI.GridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText;
    this.radGridView1.MultiSelect = true; 
}

private void button1_Click(object sender, EventArgs e)
{
    this.radGridView1.SelectAll();
    this.radGridView1.Copy();
}

If you click the button, you will notice that only one cell is copied. However, if you add 2 and more rows, the whole grid content will be copied to the clipboard.

Workaround: use the BeginRowCopy/EndRowCopy methods.

private void button1_Click(object sender, EventArgs e)
{
    this.radGridView1.SelectAll();
    this.radGridView1.MasterTemplate.BeginRowCopy();
    this.radGridView1.Copy();
    this.radGridView1.MasterTemplate.EndRowCopy();
}
Completed
Last Updated: 19 Dec 2016 12:06 by ADMIN
To reproduce:
- Add several columns including combo-box columns to a grid. 
- Add one row and upon a button click, change the data source of the combo column.

Workaround: 

Seth the following field to null prior changing the data source: 

    GetType(GridViewComboBoxColumn).GetField("nullBoundItem", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic).SetValue(combo, Nothing)
    combo.DataSource = dt




Completed
Last Updated: 06 Jun 2019 13:25 by ADMIN
Release R2 2019 SP1 (LIB 2019.2.610)
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
1
To reproduce:

Sub New()
     
    InitializeComponent()

    Dim dt1 As New DataTable
    dt1.Columns.Add("Id", GetType(Integer))
    dt1.Columns.Add("Name", GetType(String))
    For index = 1 To 20
        dt1.Rows.Add(index, "Parent" & index)
    Next
    Me.RadGridView1.MasterTemplate.DataSource = dt1
    Me.RadGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill

    Dim dt2 As New DataTable
    dt2.Columns.Add("Id", GetType(Integer))
    dt2.Columns.Add("Name", GetType(String))
    dt2.Columns.Add("ParentId", GetType(Integer))

    Dim dt3 As New DataTable
    dt3.Columns.Add("Id", GetType(Integer))
    dt3.Columns.Add("Name", GetType(String))
    dt3.Columns.Add("ParentId", GetType(Integer))
    For index = 1 To 20
        If index Mod 2 = 0 Then
            dt2.Rows.Add(index, "Child1." & index, index)
            If index Mod 4 = 0 Then
                dt3.Rows.Add(index, "Child2." & index, index)
            End If
        ElseIf index Mod 3 = 0 Then
            dt3.Rows.Add(index, "Child2." & index, index)
        Else
            dt3.Rows.Add(index, "Child2." & index, index)
        End If

    Next

    Dim template As New GridViewTemplate()
    template.DataSource = dt2
    template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill
    RadGridView1.MasterTemplate.Templates.Add(template)

    Dim relation As New GridViewRelation(RadGridView1.MasterTemplate)
    relation.ChildTemplate = template
    relation.RelationName = "FirstChild"
    relation.ParentColumnNames.Add("Id")
    relation.ChildColumnNames.Add("ParentId")
    RadGridView1.Relations.Add(relation)

    Dim template2 As New GridViewTemplate()
    template2.DataSource = dt3
    template2.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill
    RadGridView1.MasterTemplate.Templates.Add(template2)

    Dim relation2 As New GridViewRelation(RadGridView1.MasterTemplate)
    relation2.ChildTemplate = template2
    relation2.RelationName = "SecondChild"
    relation2.ParentColumnNames.Add("Id")
    relation2.ChildColumnNames.Add("ParentId")
    RadGridView1.Relations.Add(relation2)

    AddHandler Me.RadGridView1.ChildViewExpanding, AddressOf ChildViewExpanding
End Sub

Private Sub RadGridView1_ViewCellFormatting(sender As Object, e As Telerik.WinControls.UI.CellFormattingEventArgs) _
Handles RadGridView1.ViewCellFormatting
    Dim cell As GridDetailViewCellElement = TryCast(e.CellElement, GridDetailViewCellElement)
    Dim expanderCell As GridGroupExpanderCellElement = TryCast(e.CellElement, GridGroupExpanderCellElement)
    If expanderCell IsNot Nothing AndAlso TypeOf e.CellElement.RowElement Is GridDataRowElement Then
        Dim hierarchyRow As GridViewHierarchyRowInfo = DirectCast(expanderCell.RowInfo, GridViewHierarchyRowInfo)
        If Not IsExpandable(hierarchyRow) Then
            expanderCell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Hidden
        Else
            expanderCell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Visible
        End If
    ElseIf cell IsNot Nothing Then
        Dim hierarchyRow As GridViewHierarchyRowInfo = DirectCast(DirectCast(cell.RowInfo, GridViewDetailsRowInfo).Owner,  _
        GridViewHierarchyRowInfo)
        For i As Integer = 0 To cell.PageViewElement.Items.Count - 1
            Dim item As RadPageViewItem = cell.PageViewElement.Items(i)
            Dim viewInfo As GridViewInfo = hierarchyRow.Views(i)
            item.Text = "Child Template " & i
            If viewInfo.ChildRows.Count = 0 Then
                If i = 0 AndAlso i < cell.PageViewElement.Items.Count - 1 Then
                    cell.PageViewElement.Items(i + 1).IsSelected = True
                End If
                item.Visibility = Telerik.WinControls.ElementVisibility.Hidden
            Else
                item.Visibility = Telerik.WinControls.ElementVisibility.Visible
            End If
        Next
    End If
End Sub

Private Function IsExpandable(hierarchyRow As GridViewHierarchyRowInfo) As Boolean
    For Each view As GridViewInfo In hierarchyRow.Views
        If view.ChildRows.Count > 0 Then
            Return True
        End If
    Next
    Return False
End Function

Workaround:

AddHandler Me.RadGridView1.ChildViewExpanding, AddressOf RadGridView1_ChildViewExpanding 
AddHandler Me.RadGridView1.MouseDown, AddressOf RadGridView_MouseDown

Private Sub RadGridView1_ChildViewExpanding(sender As Object, e As ChildViewExpandingEventArgs)
    If lastClicked IsNot Nothing AndAlso e.ParentRow.Equals(lastClicked) Then
        e.Cancel = False
    Else
        e.Cancel = True
    End If

End Sub

Dim lastClicked As GridViewRowInfo

Private Sub RadGridView_MouseDown(sender As Object, e As MouseEventArgs)
    Dim expander As GridExpanderItem = TryCast(Me.RadGridView1.ElementTree.GetElementAtPoint(e.Location), GridExpanderItem)
    If expander IsNot Nothing Then
        lastClicked = DirectCast(expander.Parent, GridGroupExpanderCellElement).RowInfo 
    End If 
End Sub
Completed
Last Updated: 07 Dec 2016 07:42 by ADMIN
To reproduce:
- Add GridViewTextBoxColumn and set the MaxLength property.
- Paste in data row while the is not in edit mode.

Workaround:
private void RadGridView1_Pasting(object sender, Telerik.WinControls.UI.GridViewClipboardEventArgs e)
{
    if (radGridView1.CurrentColumn.Name == "column1")
    {
        GridViewTextBoxColumn col = new GridViewTextBoxColumn();
        var lenght = col.MaxLength;
        if (Clipboard.ContainsData(DataFormats.Text))
        {
            e.Cancel = true;
            string data = Clipboard.GetData(DataFormats.Text).ToString();
            radGridView1.CurrentCell.Value = data.Substring(0, lenght);
        }
    }
}

 
Completed
Last Updated: 06 Jan 2017 09:18 by ADMIN
To reproduce:

Sub New()
     
    InitializeComponent()

    Dim dt As New DataTable
    dt.Columns.Add("Id", GetType(Integer))
    dt.Columns.Add("Name", GetType(String))
    dt.Columns.Add("Description", GetType(String))

    For index = 1 To 5
        dt.Rows.Add(index, "Item" & index, "Description" & index)
    Next
    Me.RadGridView1.DataSource = dt
    Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
    
    AddHandler Me.RadGridView1.UserAddingRow, AddressOf UserAddingRow

End Sub

Private Sub UserAddingRow(sender As Object, e As Telerik.WinControls.UI.GridViewRowCancelEventArgs)
    Me.RadGridView1.MasterView.TableAddNewRow.ErrorText = ""
    If String.IsNullOrEmpty(e.Rows(0).Cells(0).Value) Then
        e.Cancel = True
        Me.RadGridView1.MasterView.TableAddNewRow.ErrorText = "Empty value is not allowed!"
    End If
End Sub

1. Click the new row and enter a value in the last cell. 
2. Click outside the new row, e.g. click on a data row. The UserAddingRow event is canceled and the new row remains current. 
3. Click a data row again without any modification on the new row. The new row is not current anymore. 
4. However, you perform step 1and 2 but instead of clicking a data row, the user clicks a header cell, the new row is not current from the first time. It is necessary to forbid the user to exit the new row until the validation passes or the new row is canceled by pressing Enter.

Workaround:  use the CellValidating/RowValidating event for validating.
Completed
Last Updated: 29 Nov 2016 09:40 by Deo
Workaround: create a custom GridDetailViewCellElement
Public Class Form1
    Sub New()

        InitializeComponent()

        AddHandler dgvPatients.CreateCell, AddressOf dgvPatients_CreateCell

    End Sub

    Private Sub dgvPatients_CreateCell(sender As Object, e As GridViewCreateCellEventArgs)
        If e.CellType = GetType(GridDetailViewCellElement) Then
            e.CellElement = New MyGridDetailViewCellElement(e.Column, e.Row)
        End If
    End Sub

End Class

Public Class MyGridDetailViewCellElement
    Inherits GridDetailViewCellElement

    Sub New(column As GridViewColumn, rowElement As GridRowElement)
        MyBase.New(column, rowElement)
    End Sub

    Public Overrides Sub UpdateTabItemsVisibility()
        If Me.DetailsRow Is Nothing Then
            Return
        End If

        MyBase.UpdateTabItemsVisibility()
    End Sub

End Class
Completed
Last Updated: 25 Nov 2016 08:51 by ADMIN
To reproduce:

GridViewTextBoxColumn textBoxColumn1 = new GridViewTextBoxColumn("Col 1");
textBoxColumn1.FieldName = "col1";
radGridView1.MasterTemplate.Columns.Add(textBoxColumn1);
GridViewTextBoxColumn textBoxColumn2 = new GridViewTextBoxColumn("Col 2");
textBoxColumn2.FieldName = "col2";
textBoxColumn2.FormatString = "{0:d}"; 
radGridView1.MasterTemplate.Columns.Add(textBoxColumn2);
radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

DataTable dt = new DataTable();
dt.Columns.Add("col1", typeof(string));
dt.Columns.Add("col2", typeof(DateTime));
for (int i = 0; i < 10; i++)
{
    dt.Rows.Add("Item" + i, DateTime.Now.AddDays(i)); 
}
this.radGridView1.AutoGenerateColumns = false;
this.radGridView1.DataSource = dt;

Right click the row header cell and select Copy. The  following exception occurs although we don't have a GridViewDateTimeColumn : System.InvalidCastException was unhandled
  HResult=-2147467262
  Message=Unable to cast object of type 'Telerik.WinControls.UI.GridViewTextBoxColumn' to type 'Telerik.WinControls.UI.GridViewDateTimeColumn'.
  Source=Telerik.WinControls.GridView
  StackTrace:
       at Telerik.WinControls.UI.MasterGridViewTemplate.CopyRows(String format, Boolean cut, Boolean cutOperation, StringBuilder content)
       at Telerik.WinControls.UI.MasterGridViewTemplate.ProcessContent(String format, Boolean cut, Boolean cutOperation)
       at Telerik.WinControls.UI.MasterGridViewTemplate.CopyContent(Boolean cut)
       at Telerik.WinControls.UI.MasterGridViewTemplate.Copy()
       at Telerik.WinControls.UI.GridDataRowElement.copyItem_Click(Object sender, EventArgs e)
       at Telerik.WinControls.RadElement.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e)
       at Telerik.WinControls.RadElement.DoClick(EventArgs e)
       at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
       at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadControl.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.RadPopupControlBase.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 System.Windows.Forms.Application.Run(Form mainForm)
       at _1075342CopyText.Program.Main() in d:\Projects\1075342CopyText_Binding\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Workaround: use a GridViewDateTimeColumn 
Completed
Last Updated: 25 Nov 2016 12:10 by ADMIN
Please refer to the attached sample project and select a new value in the drop down.

Workaround: change the PageSize in the RadDropDownListElement.PopupClosed event:

public sealed class PageSizeDropdownHeaderCellElement : GridHeaderCellElement
{
    public PageSizeDropdownHeaderCellElement(GridViewColumn col, GridRowElement row) : base(col, row)
    {
        TextAlignment = ContentAlignment.TopCenter;
        Alignment = ContentAlignment.TopCenter;
    }

    private RadDropDownListElement _dropDownListElement;

    protected override void CreateChildElements()
    {
        base.CreateChildElements();
        _dropDownListElement = new RadDropDownListElement();
        if (_dropDownListElement != null && _dropDownListElement.DataSource == null)
        {
            _dropDownListElement = new RadDropDownListElement();
            _dropDownListElement.BindingContext = new BindingContext();
            _dropDownListElement.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;

            _dropDownListElement.Items.Clear();
            _dropDownListElement.Items.Add(new RadListDataItem("10", 10) { Selected = true });
            _dropDownListElement.Items.Add(new RadListDataItem("25", 25));
            _dropDownListElement.Items.Add(new RadListDataItem("50", 50));
            _dropDownListElement.Items.Add(new RadListDataItem("100", 100));
            _dropDownListElement.Items.Add(new RadListDataItem("All", -1));

            _dropDownListElement.Margin = new Padding(15, 0, 0, 0);
            _dropDownListElement.StretchHorizontally = true;
            _dropDownListElement.NotifyParentOnMouseInput = false;
            _dropDownListElement.Popup.MouseClick += Popup_MouseClick;
            _dropDownListElement.PopupClosed += _dropDownListElement_PopupClosed; 
            this.Children.Add(_dropDownListElement);
        }
    }

    RadListVisualItem elementUnderMouse;

    private void Popup_MouseClick(object sender, MouseEventArgs e)
    {
        elementUnderMouse = _dropDownListElement.Popup.ElementTree.GetElementAtPoint(e.Location) as RadListVisualItem;
    }
    
    private void _dropDownListElement_PopupClosed(object sender, RadPopupClosedEventArgs args)
    {
        if (elementUnderMouse == null)
        {
            return;
        }
        if (_dropDownListElement.SelectedIndex == -1)
            return;

        var pageSize = Convert.ToInt32(elementUnderMouse.Data.Value);
        if (pageSize == -1)
        {
            pageSize = GridControl.RowCount;
        }
        else
        {
            pageSize = pageSize <= GridControl.RowCount ? pageSize : GridControl.RowCount;
        }
        this.RowInfo.Tag = pageSize;
        GridControl.PageSize = pageSize;
        elementUnderMouse = null;
    }
    
    protected override void SetContentCore(object value)
    {
        if (_dropDownListElement != null && this.RowInfo.Tag != null)
        {
            this._dropDownListElement.SelectedValue = (int)this.RowInfo.Tag;
        }
    }

    public override bool IsCompatible(GridViewColumn data, object context)
    {
        return data is ActionColumn && context is GridTableHeaderRowElement;
    }

    protected override Type ThemeEffectiveType     
            { 
                get    
                { 
                    return typeof(GridHeaderCellElement);     
                }
            }
}


Completed
Last Updated: 24 Nov 2016 12:09 by ADMIN
To reproduce:
- Subscribe to the CellClick event 
- Click several times in the grid with the right mouse button. 
- At some point, the CellClick event will be executed. 

Workaround:
- Use the Click event:

private void RadGridView1_Click(object sender, EventArgs e)
{
    var args = e as MouseEventArgs;
    if (args.Button == MouseButtons.Left)
    {
        var clickedCell = radGridView1.ElementTree.GetElementAtPoint(args.Location) as GridDataCellElement;
        if (clickedCell != null)
        {
            //add your code here
        }
    }
}