Completed
Last Updated: 16 Feb 2017 07:11 by ADMIN
How to reproduce: check the attached video as well

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        this.radGridView1.DataSource = this.GetData();
    }

    private DataTable GetData()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("Id", typeof(int));
        dt.Columns.Add("Name", typeof(string));
        dt.Columns.Add("Date", typeof(DateTime));
        dt.Columns.Add("Bool", typeof(bool));
        for (int i = 0; i < 10; i++)
        {
            dt.Rows.Add(i, "Name " + i, DateTime.Now.AddDays(i), i % 2 == 0);
        }

        return dt;
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        this.radGridView1.TableElement.ScrollToRow(0);
        this.radGridView1.Focus();
    }
}

Workaround: call the method if the row is not selected
private void radButton1_Click(object sender, EventArgs e)
{
    if (!this.radGridView1.Rows[0].IsSelected)
    {
        this.radGridView1.TableElement.ScrollToRow(0);    
    }
    
    this.radGridView1.Focus();
}
Completed
Last Updated: 05 Sep 2016 17:06 by ADMIN
To reproduce:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 
    Me.ProductsTableAdapter.Fill(Me.NwindDataSet.Products) 
    Me.CategoriesTableAdapter.Fill(Me.NwindDataSet.Categories)

    Me.ProductsTableAdapter.Fill(Me.NwindDataSet.Products)
    Me.CategoriesTableAdapter.Fill(Me.NwindDataSet.Categories)
    RadGridView1.AutoGenerateHierarchy = True
    RadGridView1.DataSource = Me.NwindDataSet
    RadGridView1.DataMember = "Categories"
End Sub

Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
    Dim style As New GridPrintStyle()
    style.PrintHierarchy = True
    style.HierarchyIndent = 20
    style.ChildViewPrintMode = ChildViewPrintMode.SelectViewToPrint
    Me.RadGridView1.PrintStyle = style
    Me.RadGridView1.PrintPreview()
End Sub

Please refer to the attached gif file.

Workaround:

Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click

    Me.RadGridView1.PrintSettingsDialogFactory = New CustomGridViewPrintSettingsDialogFactory()

    Dim style As New GridPrintStyle()
    style.PrintHierarchy = True
    style.HierarchyIndent = 20
    style.ChildViewPrintMode = ChildViewPrintMode.SelectViewToPrint
    Me.RadGridView1.PrintStyle = style
    Me.RadGridView1.PrintPreview()
End Sub

Public Class CustomGridViewPrintSettingsDialog
Inherits GridViewPrintSettingsDialog 

    Sub New(document As RadPrintDocument)
        MyBase.New(document)
    End Sub
     
    Protected Overrides Sub LoadSettings()
        MyBase.LoadSettings()

        Dim gridView As RadGridView = TryCast(Me.PrintDocument.AssociatedObject, RadGridView)
        Me.printStyleSettingControl.PrintStyle.PrintHierarchy =gridView.PrintStyle.PrintHierarchy 
    End Sub
End Class

Public Class CustomGridViewPrintSettingsDialogFactory
    Implements IPrintSettingsDialogFactory

    Public Function CreateDialog(document As RadPrintDocument) As Form Implements IPrintSettingsDialogFactory.CreateDialog
        Return New CustomGridViewPrintSettingsDialog(document)
    End Function
End Class
Unplanned
Last Updated: 02 Sep 2016 12:28 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();
    this.radGridView1.Columns.Add("Name");
    this.radGridView1.Columns.Add("ID");

    this.radGridView1.RowsChanged += radGridView1_RowsChanged;
}

private void radGridView1_RowsChanged(object sender, GridViewCollectionChangedEventArgs e)
{
    Console.WriteLine(e.Action);
    if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Add)
    {
        GridViewRowInfo row = e.NewItems[0] as GridViewRowInfo;
        row.Cells["ID"].Value = this.radGridView1.Rows.Count;
    }
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radGridView1.Rows.Add("Item" + this.radGridView1.Rows.Count);
}

Note: the first firing of the RowsChanged event used to be with Action=Add.
Completed
Last Updated: 30 Nov 2016 07:24 by ADMIN
Note: if you change the image in Windows8 theme for example, the image is successfully applied.

Workaround: set the CurrentRowHeaderImage property at run time.
Completed
Last Updated: 04 Jan 2017 15:57 by ADMIN
To reproduce
- Set the AutoSize and AutoSizeRows properties to true.
- Start editing a cell.
- Exception occurs.

Workaround:
class MyGrid : RadGridView
{
    protected override void OnResize(EventArgs e)
    {
        //base.OnResize(e);
    }
}
Completed
Last Updated: 07 Dec 2016 13:49 by ADMIN
To reproduce:

DataTable dt = new DataTable();

public Form1()
{
    InitializeComponent();
 
    for (int i = 0; i < 5; i++)
    {
        dt.Columns.Add("Col" + i);
    }
     
    for (int i = 0; i < 5; i++)
    {
        DataRow row = dt.NewRow();
        dt.Rows.Add(row);
        foreach (DataColumn col in dt.Columns)
        {
            row[col.ColumnName] = randomWord(2, 14);
        }
    }
}

static Random r = new Random();
static string chars = "AEIOUBCDFGHJKLMNPQRSTVWXYZ";

static string randomWord(int minlen, int maxlen)
{
    double d1 = minlen + r.NextDouble() * (maxlen - minlen); 
    
    int len = (int)d1;
    
    char[] word = new char[len];
    for (int i = 0; i < len; ++i)
    {
        int index = ((int)Math.Round(25 * r.NextDouble() + 0.4999999999));
        word[i] = chars[index];
    }
    return new string(word);
}

public class Item
{
    public int Id { get; set; }

    public string Name { get; set; }

    public Item(int id, string name)
    {
        this.Id = id;
        this.Name = name;
    }
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radGridView1.Columns.Clear();
    foreach (DataColumn col in dt.Columns)
    {
        this.radGridView1.Columns.Add(col.ColumnName);
        this.radGridView1.Columns.Last().FieldName = col.ColumnName;
    }
     this.radGridView1.BestFitColumns(BestFitColumnMode.AllCells); 
}

private void Form1_Load(object sender, EventArgs e)
{
    this.radGridView1.AutoGenerateColumns = false;
    this.radGridView1.DataSource = dt; 

    foreach (DataColumn col in dt.Columns)
    {
        this.radGridView1.Columns.Add(col.ColumnName); 
        this.radGridView1.Columns.Last().FieldName = col.ColumnName;
    }
     this.radGridView1.BestFitColumns(BestFitColumnMode.AllCells); 
}

Workaround: clear the GroupDescriptors  collection as well and add the GroupDescriptor programmatically: http://docs.telerik.com/devtools/winforms/gridview/grouping/setting-groups-programmatically
Completed
Last Updated: 04 Oct 2016 08:22 by ADMIN
Please refer to the attached screenshot.

To reproduce:

public Form1()
{
    InitializeComponent(); 

    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, "Item" + i);
    }

    Random rand = new Random();
    DataTable dt2 = new DataTable();
    dt2.Columns.Add("Id", typeof(int));
    dt2.Columns.Add("Name2", typeof(string));
    dt2.Columns.Add("ParentId", typeof(int));
    for (int i = 0; i < 20; i++)
    {
        dt2.Rows.Add(i, "Child Item" + i, rand.Next(0, 5));
    }

    radGridView1.DataSource = dt;
    radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    GridViewTemplate template = new GridViewTemplate();
    template.DataSource = dt2;
    template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    radGridView1.MasterTemplate.Templates.Add(template);
    template.Columns["ParentId"].IsVisible = false;

    GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
    relation.ChildTemplate = template;
    relation.RelationName = "MasterDetail";
    relation.ParentColumnNames.Add("Id");
    relation.ChildColumnNames.Add("ParentId");
    radGridView1.Relations.Add(relation);

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

Workaround: change the Name property of the column in order to avoid duplicated columns: 

template.Columns["Name"].Name = "Name2";
Completed
Last Updated: 28 Dec 2016 09:11 by ADMIN
To reproduce:
- Add a grid to a form and set the EnableHotTracking property to false in the properties window.
- When the application is started the property is reset.

Workaround:
Set the property at runtime.
Completed
Last Updated: 18 Oct 2016 10:19 by ADMIN
To reproduce:

private void Form1_Load(object sender, EventArgs e)
{
    this.order_DetailsTableAdapter.Fill(this.nwindDataSet.Order_Details);

    this.radGridView1.DataSource = this.orderDetailsBindingSource;
    this.radGridView1.EnablePaging = true;
    this.radGridView1.AutoSizeRows = true;
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radGridView1.PrintStyle.PrintAllPages = true;
    this.radGridView1.PrintPreview();
} 

Workaround:  refresh the MasterTemplate after the PrintPreview dialog is closed: 

this.radGridView1.PrintPreview();

this.radGridView1.MasterTemplate.Refresh();
Completed
Last Updated: 23 Aug 2016 10:07 by ADMIN
Workaround: change the name of the column
this.radGridView1.Columns["Table:Name"].Name = "Table|Name";
Completed
Last Updated: 20 Sep 2016 07:33 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
When you export ht grid content to HTML, the exported table contains an 'width' attribute set to 0. It is not possible to change this attribute. This prevents the HTML to be loaded correctly in RadRichTextEditor later.
Completed
Last Updated: 26 Jan 2017 10:31 by ADMIN
Please refer to the attached sample project. Activate the editor for the "Notes" column of the first row, don't perform any changes and click another row. You will notice that the  DataRow.RowState is Modified although no change is performed. If you perform the same actions with a MS DataGridView, the RowState is not Modified.

Note: the GridViewRowInfo.IsModified property in the CellEndEdit is also set to true without modifying the cell's value. 

Workaround: handle the CellBeginEdit and CellEndEdit events and compare the values before and after the edit operation:

object initialValue = null;

private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
{
    initialValue = e.Row.Cells[e.ColumnIndex].Value;
}

private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    if (initialValue != e.Value)
    {
        Console.WriteLine("modified");
    }
    else
    {
        Console.WriteLine("NOT modified");
    }
}
Unplanned
Last Updated: 17 Aug 2016 08:29 by ADMIN
Create a DataTable with columns Column1, Column2, Column3, Column4, Column5, and bound to RadGridView. Create a second DataTable with columns Column1, Column2a, Column3, Column4, Column5, and re-bind the RadGridView to this DataTable. Instead of the columns appearing in the same order as they are in the second DataTable, they show up as Column1, Column3, Column4, Column5, Column2a in the RadGridView. 
Completed
Last Updated: 26 Sep 2016 07:34 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    GridViewComboBoxColumn comboCol = new GridViewComboBoxColumn();         
    comboCol.DataSource = InitComboActive();
    comboCol.ValueMember = "ActiveCode";
    comboCol.DisplayMember = "ActiveDsc";
    comboCol.FieldName = "ActiveCode";

    this.radGridView1.Columns.Add(comboCol);

    this.radGridView1.AutoGenerateColumns = false;
    BindRadGrid();
    this.radGridView1.CellValueChanged += radGridView1_CellValueChanged;
}

private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    BindRadGrid();
}

private void BindRadGrid()
{
    this.radGridView1.DataSource = null;
    this.radGridView1.DataSource = InitComboData();
}

private DataTable InitComboActive()
{
    DataTable dt = new DataTable("DtActive");
    dt.Columns.Add("ActiveCode");
    dt.Columns.Add("ActiveDsc");

    dt.Rows.Add("0", "InActive");
    dt.Rows.Add("1", "Active");

    return dt;
}

private DataTable InitComboData()
{
    DataTable dt = new DataTable("DtData");
    dt.Columns.Add("Host");
    dt.Columns.Add("ActiveCode");
    dt.Columns.Add("ActiveDsc");
    
    dt.Rows.Add("Host A", "0", "InActive");
    dt.Rows.Add("Host B", "1", "Active");

    return dt;
}

Workaround: use the RadGridView.CellEndEdit instead for rebinding. 
Workaround 2: use the CellValidated event:
private void radGridView1_CellValidated(object sender, CellValidatedEventArgs e)
{
    if (e.Row is GridViewDataRowInfo)
    {
        BindRadGrid();
    }
}

Completed
Last Updated: 12 Oct 2016 08:35 by ADMIN
To reproduce:

public RadForm1()
{
    InitializeComponent();
    DataTable dt = new DataTable();
    for (int i = 0; i < 10; i++)
    {
        dt.Columns.Add("Col" + i);
    }

    for (int i = 0; i < 50; i++)
    {
        DataRow dr = dt.NewRow();
        foreach (DataColumn col in dt.Columns)
        {
            dr[col.ColumnName] = "Data." + i + "." + dt.Columns.IndexOf(col);
        }
        dt.Rows.Add(dr);
    }

    this.radGridView1.DataSource = dt;
    this.radGridView1.MasterTemplate.EnablePaging = true;
    this.radGridView1.MasterTemplate.ShowGroupedColumns = true;
}

public void ExportContactToExcelFile(string strFileName)
{
    GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
    SpreadExportRenderer exportRenderer = new SpreadExportRenderer();
       
    spreadExporter.PagingExportOption = PagingExportOption.AllPages;
    spreadExporter.ExportVisualSettings = true;
    spreadExporter.SheetName = "Contacts";
    spreadExporter.RunExport(strFileName, exportRenderer);
}

private void radButton1_Click(object sender, EventArgs e)
{
    ExportContactToExcelFile(@"..\..\Export" + DateTime.Now.ToLongTimeString().Replace(":", "_") + ".xlsx");
}
 
Workaround: refresh the MasterTemplate after the export:

private void radButton1_Click(object sender, EventArgs e)
{
    ExportContactToExcelFile(@"..\..\Export" + DateTime.Now.ToLongTimeString().Replace(":", "_") + ".xlsx");
    this.radGridView1.MasterTemplate.Refresh();
}
Declined
Last Updated: 19 Aug 2016 11:44 by ADMIN
When you set a RadGridView's SelectionMode to GridViewSelectionMode.CellSelect and then you highlight full rows by using the row header, the SelectedRows collection is empty.  Telerik support informed me this is "as expected" and that I should use "SelectedCells" collection when using the CellSelect Mode.  While this is a decent workaround I don't see why SelectedRows collection can't be filled when the entire row is actually highlighted.  
Completed
Last Updated: 20 Sep 2016 06:41 by ADMIN
To reproduce:

 public RadForm1()
 {
     InitializeComponent();
     
     DataTable master = new DataTable();
     master.Columns.Add("ID", typeof(int));
     master.Columns.Add("test", typeof(string));
     
     for (int i = 0; i < 500; i++)
     {
         master.Rows.Add(i, "Row " + i);
     }

     radGridView1.DataSource = master;

     radLabel1.Text = "RadGridView: AutoSizeRows = " + ((radGridView1.AutoSizeRows) ? "True" : "False");
 }

 private void radButton1_Click(object sender, EventArgs e)
 {
     radGridView1.TableElement.ScrollToRow(radGridView1.MasterTemplate.Rows[200]);
 }

 private void radButton2_Click(object sender, EventArgs e)
 {
     radGridView1.AutoSizeRows = !radGridView1.AutoSizeRows;

     radLabel1.Text = "RadGridView: AutoSizeRows = " + ((radGridView1.AutoSizeRows) ? "True" : "False");
 }


Workaround:

this.radGridView1.ViewDefinition = new CustomTableViewDefinition();


        public class CustomTableViewDefinition : TableViewDefinition
        {
            public override IRowView CreateViewUIElement(GridViewInfo viewInfo)
            {
                return new CustomGridTableElement();
            }
        }

        public class CustomGridTableElement : GridTableElement
        {
              protected override Type ThemeEffectiveType     
                 { 
                    get    
                              { 
                                     return typeof(GridTableElement);     
                               }
                   }
            public override void ScrollToRow(GridViewRowInfo rowInfo)
            {
                if (rowInfo == null || rowInfo.IsPinned || !rowInfo.IsVisible || rowInfo is GridViewDetailsRowInfo)
                {
                    return;
                }

                this.ViewElement.InvalidateMeasure();
                this.ViewElement.UpdateLayout();

                if (GridViewElement.AutoSizeRows || (ViewTemplate.Templates.Count > 0 && rowInfo.ViewTemplate.Parent != null))
                {
                    ScrollToRowCore(rowInfo, false);

                    return;
                }

                this.RowScroller.ScrollToItem(rowInfo, false);
                this.UpdateLayout();
            }

            private void ScrollToRowCore(GridViewRowInfo rowInfo, bool ensureVisible)
            {
                if (!this.GridViewElement.UseScrollbarsInHierarchy && this.ViewInfo.ParentRow != null)
                {
                    if (ensureVisible)
                    {
                        this.GridViewElement.TableElement.EnsureRowVisible(rowInfo);
                    }
                    else
                    {
                        this.GridViewElement.TableElement.ScrollToRow(rowInfo);
                    }
                    return;
                }

                if (!this.IsInValidState(true) || this.VScrollBar.LargeChange == 0)
                {
                    return;
                }

                RadControl control = this.ElementTree.Control as RadControl;
                if (control != null)
                {
                    control.SuspendUpdate();
                }

                int oldValue = this.VScrollBar.Value;
                GridRowElement rowElement = GetChildRowElement(rowInfo);
                
                if (rowElement == null && this.PageViewMode == PageViewMode.ExplorerBar)
                {
                    if (control != null)
                    {
                        control.ResumeUpdate();
                    }

                    return;
                }

                while (this.VScrollBar.Value < this.VScrollBar.Maximum)
                {
                    if (rowElement == null)
                    {
                        rowElement = GetChildRowElement(rowInfo);
                    }
                    if (rowElement != null)
                    {
                        ScrollToPartiallyVisibleRow(rowElement, ensureVisible);
                        break;
                    }
                    else
                    {
                        bool scrollRangeChanged = SetScrollValue(this.VScrollBar, this.VScrollBar.Value + this.VScrollBar.SmallChange);
                        if (this.VScrollBar.Value >= this.VScrollBar.Maximum - this.VScrollBar.LargeChange + 1 && !scrollRangeChanged)
                        {
                            SetScrollValue(this.VScrollBar, oldValue);
                            break;
                        }
                    }
                }

                if (oldValue == this.VScrollBar.Minimum || rowElement != null)
                {
                    if (control != null)
                    {
                        control.ResumeUpdate();
                    }
                    return;
                }

                SetScrollValue(this.VScrollBar, 0);

                while (this.VScrollBar.Value < oldValue)
                {
                    if (rowElement == null)
                    {
                        rowElement = GetChildRowElement(rowInfo);
                    }
                    if (rowElement != null)
                    {
                        ScrollToPartiallyVisibleRow(rowElement, ensureVisible);
                        break;
                    }
                    else
                    {
                        bool scrollRangeChanged = SetScrollValue(this.VScrollBar, this.VScrollBar.Value + this.VScrollBar.SmallChange);
                        if (this.VScrollBar.Value >= this.VScrollBar.Maximum - this.VScrollBar.LargeChange + 1 && !scrollRangeChanged)
                        {
                            SetScrollValue(this.VScrollBar, oldValue);
                            break;
                        }
                    }
                }

                if (control != null)
                {
                    control.ResumeUpdate();
                }
            }

            private GridRowElement GetChildRowElement(GridViewRowInfo rowInfo)
            {
                if (rowInfo.ViewInfo == this.ViewInfo)
                {
                    return GetRowElement(rowInfo);
                }
                else
                {
                    GridTableElement tableElement = GridViewElement.GetRowView(rowInfo.ViewInfo) as GridTableElement;
                    if (tableElement != null)
                    {
                        return tableElement.GetRowElement(rowInfo);
                    }
                }
                return null;
            }

            private void ScrollToPartiallyVisibleRow(GridRowElement rowElement, bool ensureVisible)
            {
                int delta = 0;

                while ((rowElement.ControlBoundingRectangle.Y < ViewElement.ScrollableRows.ControlBoundingRectangle.Y &&
                        rowElement.ControlBoundingRectangle.Bottom > ViewElement.ScrollableRows.ControlBoundingRectangle.Y) ||
                       (rowElement.ControlBoundingRectangle.Y < ViewElement.ScrollableRows.ControlBoundingRectangle.Bottom &&
                        rowElement.ControlBoundingRectangle.Bottom > ViewElement.ScrollableRows.ControlBoundingRectangle.Bottom))
                {
                    if (rowElement.ControlBoundingRectangle.Y < ViewElement.ScrollableRows.ControlBoundingRectangle.Y &&
                        rowElement.ControlBoundingRectangle.Bottom > ViewElement.ScrollableRows.ControlBoundingRectangle.Y)
                    {
                        delta = ViewElement.ScrollableRows.ControlBoundingRectangle.Y - rowElement.ControlBoundingRectangle.Y;
                        SetScrollValue(this.VScrollBar, this.VScrollBar.Value - delta);

                        return;
                    }

                    if (rowElement.ControlBoundingRectangle.Y < ViewElement.ScrollableRows.ControlBoundingRectangle.Bottom &&
                        rowElement.ControlBoundingRectangle.Bottom > ViewElement.ScrollableRows.ControlBoundingRectangle.Bottom)
                    {
                        delta = rowElement.ControlBoundingRectangle.Top - ViewElement.ScrollableRows.ControlBoundingRectangle.Top;
                        SetScrollValue(this.VScrollBar, this.VScrollBar.Value + delta);

                        return;
                    }

                    if (ensureVisible)
                    {
                        delta = rowElement.ControlBoundingRectangle.Bottom - ViewElement.ScrollableRows.ControlBoundingRectangle.Bottom;

                        if (delta < 0)
                        {
                            break;
                        }
                    }
                    else
                    {
                        delta = rowElement.ControlBoundingRectangle.Y - ViewElement.ScrollableRows.ControlBoundingRectangle.Y;

                        if (delta < 0)
                        {
                            delta = 0;
                        }
                    }

                    bool scrollRangeChanged = SetScrollValue(this.VScrollBar, this.VScrollBar.Value + delta);

                    if (this.VScrollBar.Value >= this.VScrollBar.Maximum - this.VScrollBar.LargeChange + 1 || !scrollRangeChanged)
                    {
                        break;
                    }
                }
            }
            
            private bool SetScrollValue(RadScrollBarElement scrollbar, int newValue)
            {
                int max = this.VScrollBar.Maximum;

                if (newValue > scrollbar.Maximum - scrollbar.LargeChange + 1)
                {
                    newValue = scrollbar.Maximum - scrollbar.LargeChange + 1;
                }

                if (newValue < scrollbar.Minimum)
                {
                    newValue = scrollbar.Minimum;
                }

                scrollbar.Value = newValue;
                this.UpdateLayout();

                return max != this.VScrollBar.Maximum;
            }
        }
  
Unplanned
Last Updated: 05 Aug 2016 09:07 by ADMIN
To reproduce:

 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 
     Me.CategoriesTableAdapter.Fill(Me.NwindDataSet.Categories)

     Me.RadGridView1.DataSource = Me.CategoriesBindingSource

     Dim viewDef As New ColumnGroupsViewDefinition
     Dim group1 = New GridViewColumnGroup()
     Dim row1 = New GridViewColumnGroupRow
     group1.Rows.Add(row1)
     row1.ColumnNames.Add("CategoryID")
     row1.ColumnNames.Add("CategoryName")
     viewDef.ColumnGroups.Add(group1)

     Dim group2 = New GridViewColumnGroup()
     Dim row2 = New GridViewColumnGroupRow
     group2.Rows.Add(row2)
     row2.ColumnNames.Add("Description")
     row2.ColumnNames.Add("Picture")
     viewDef.ColumnGroups.Add(group2)

     Me.RadGridView1.ViewDefinition = viewDef
 End Sub

 Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
     Console.WriteLine("BEFORE >>")
     For Each col As GridViewColumn In Me.RadGridView1.Columns
         Console.WriteLine(col.Name & " >> " & col.Width )
     Next

     Dim style As New GridPrintStyle()
     style.FitWidthMode = PrintFitWidthMode.FitPageWidth
     Me.RadGridView1.PrintStyle = style
     Me.RadGridView1.PrintPreview()

     Console.WriteLine("AFTER >>")
     For Each col As GridViewColumn In Me.RadGridView1.Columns
         Console.WriteLine(col.Name & " >> " & col.Width)
     Next
 End Sub

IMPORTANT: If you resize one of the columns at run time before calling the PrintPreview method, the columns' width is restored. In addition, if you call the PrintPreview method without resizing the columns before that, close the dialog and hide one of the columns by using the default context menu, the columns' width for the visible columns is enlarged.

Workaround: you can get the columns width by using the ColumnGroupRowLayout:

Dim rowLayout As ColumnGroupRowLayout = TryCast(Me.RadGridView1.TableElement.ViewElement.RowLayout, ColumnGroupRowLayout)
 
For Each col As GridViewColumn In Me.RadGridView1.Columns
    Dim info As ColumnGroupsCellArrangeInfo = rowLayout.GetColumnData(col)
    Debug.WriteLine(col.Name & " >> " & info.Bounds.Width)
Next
Completed
Last Updated: 05 Dec 2016 12:19 by ADMIN
Please refer to the attached sample project and gif files. The user is not allowed to drop in the first half of the row element. However, the drop operation is allowed in the second half. Once the RadDragOverEventArgs.CanDrop property is set to false, the before/after row hint is disposed and it is not shown for this row anymore.

Workaround: 

public class CustomRadGridViewDragDropService : RadGridViewDragDropService
{
    public CustomRadGridViewDragDropService(RadGridViewElement gridViewElement) : base(gridViewElement)
    {
    }

    public override string Name
    {
        get
        {
            return typeof(RadGridViewDragDropService).Name;
        }
    }

    protected override void OnPreviewDragOver(RadDragOverEventArgs e)
    {
        base.OnPreviewDragOver(e);
        SetDragDropBehavior();
        Point p = this.GridViewElement.ElementTree.Control.PointToClient(Cursor.Position);
        UpdateDragHintLocation(p);
    }
}


this.radGridView1.GridViewElement.RegisterService(new CustomRadGridViewDragDropService(this.radGridView1.GridViewElement));  
Completed
Last Updated: 14 Feb 2017 14:13 by ADMIN
To reproduce:

 private void Form1_Load(object sender, EventArgs e)
 { 
     this.productsTableAdapter.Fill(this.nwindDataSet.Products); 
     this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);

     this.radGridView1.AutoGenerateColumns = false;
     this.radGridView1.DataSource = this.productsBindingSource;
   
     GridViewComboBoxColumn col = new GridViewComboBoxColumn();
     col.DataSource = this.categoriesBindingSource;
     col.MinWidth = 200;
     col.DisplayMember = "Description";
     col.ValueMember = "CategoryID";
     this.radGridView1.Columns.Add(col);

     this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
     this.radGridView1.CellValueChanged += radGridView1_CellValueChanged;
 }

private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    string value = "{nothing}";

    if (e.Value != null)
    {
        value = Convert.ToString(e.Value);
    }
    RadMessageBox.Show("CellValueChanged. Value >> " + value);
}

Note: if the cell value is not null, the CellValueChanged event is not fired when the selection in drop down is not changed.
Additional scenario: if you use a RadMultiColumnComboBoxElement for this column replaced in the EditorRequired, the issue is reproducible again.