Completed
Last Updated: 10 Jul 2015 14:42 by ADMIN
Workaround: create a custom GridCheckBoxHeaderCellElement and override the Attach method

public class MyGridCheckBoxHeaderCellElement : GridCheckBoxHeaderCellElement
{

	public MyGridCheckBoxHeaderCellElement(GridViewColumn column, GridRowElement row) : base(column, row)
	{
	}

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

	public override void Attach(GridViewColumn data, object context)
	{
		if (((GridViewCheckBoxColumn)data).EnableHeaderCheckBox) {
			base.Attach(data, context);
		} else {
			this.CheckBox.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
		}
	}
}

public Form1()
{
        InitializeComponent();
	this.radGridView1.CreateCell += radGridView1_CreateCell;
}


private void radGridView1_CreateCell(object sender, Telerik.WinControls.UI.GridViewCreateCellEventArgs e)
{
	if (e.CellType == typeof(GridCheckBoxHeaderCellElement)) {
		e.CellElement = new MyGridCheckBoxHeaderCellElement(e.Column, e.Row)
	}
}
Completed
Last Updated: 17 Aug 2015 10:06 by ADMIN
To reproduce:
private RadGridView radGridView1;

public Form1()
{
    InitializeComponent();
    radGridView1 = new RadGridView() { Dock = DockStyle.Fill };
    Controls.Add(radGridView1);

    List<Item> items = new List<Item>();
    for (int i = 0; i < 10; i++)
    {
        items.Add(new Item(i, "Item" + i, DateTime.Now.AddDays(i)));
    }
    radGridView1.AutoGenerateColumns = true;
    this.radGridView1.DataSource = items;
    this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    this.radGridView1.EnableFiltering = true;

    this.radGridView1.CustomFiltering += radGridView1_CustomFiltering;
    radGridView1.EnableCustomFiltering = true;
}

void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
{
    e.Handled = false;
    e.Visible = true;

    var item = (Item)e.Row.DataBoundItem;

    if (item == null)
        return;

    if (item.Name.EndsWith("Item"))
    {
        e.Handled = true;
        e.Visible = false;
    }
}

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

    public string Name { get; set; }

    public Nullable<DateTime> Date { get; set; }

    public Item(int id, string name, Nullable<DateTime> date)
    {
        this.Id = id;
        this.Name = name;
        this.Date = date;
    }
}


Workaround:

private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    this.radGridView1.MasterTemplate.Refresh();
}
Completed
Last Updated: 13 Oct 2015 06:51 by ADMIN
To reproduce:
Me.RadGridView1.MultiSelect = True

Private Sub RadGridView1_CellFormatting(sender As Object, e As Telerik.WinControls.UI.CellFormattingEventArgs) _
Handles RadGridView1.CellFormatting
    If e.Row.IsSelected Then
        e.CellElement.BackColor = Color.LimeGreen
        e.CellElement.DrawFill = True
        e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
    Else
        e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local)
        e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local)
        e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local)
    End If
End Sub

Step 1: Select a few rows with the mouse click in combination with the CTRL key.
Step 2: The rows are selected correctly and the desired green back color is applied. Release the CTRL Key.
Step 3: Click with the mouse on a different row in the grid.

Result: All previously selected rows but the last current row keep the green back color.

Workaround:

Sub New()
    InitializeComponent()
 
    Me.RadGridView1.MultiSelect = True
    AddHandler Me.RadGridView1.SelectionChanging, AddressOf SelectionChanging
    AddHandler Me.RadGridView1.SelectionChanged, AddressOf SelectionChanged
 
End Sub
 
Private Sub RadGridView1_CellFormatting(sender As Object, e As Telerik.WinControls.UI.CellFormattingEventArgs) _
Handles RadGridView1.CellFormatting
    e.CellElement.DrawFill = True
    e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
    If e.Row.IsSelected Then
        e.CellElement.BackColor = Color.LimeGreen
    Else
        e.CellElement.BackColor = Color.Yellow
    End If
End Sub
Private Sub SelectionChanged(sender As Object, e As EventArgs)
    For Each r As GridViewRowInfo In selectedRows
        r.InvalidateRow()
    Next
    selectedRows.Clear()
End Sub
 
Dim selectedRows As New List(Of GridViewRowInfo)
Private Sub SelectionChanging(sender As Object, e As GridViewSelectionCancelEventArgs)
    For Each r As GridViewRowInfo In Me.RadGridView1.SelectedRows
        selectedRows.Add(r)
    Next
End Sub
Completed
Last Updated: 25 Jun 2015 12:35 by ADMIN
Completed
Last Updated: 07 Sep 2015 07:43 by ADMIN
To reproduce:

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

    this.radGridView1.DataSource = this.customersBindingSource;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

    foreach (GridViewColumn col in this.radGridView1.Columns)
    {
        col.MinWidth = 100;
    }
    
    ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
    view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));
    view.ColumnGroups.Add(new GridViewColumnGroup("Details"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Address"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Contact"));
    view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["CompanyName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactTitle"]);

    view.ColumnGroups[1].Groups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Address"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["City"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Country"]);

    view.ColumnGroups[1].Groups[1].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Phone"]);
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Fax"]);
    radGridView1.ViewDefinition = view;
}

Please refer to the attached gif file illustrating the behavior when no ColumnGroupsViewDefinition is applied. The horizontal scroll-car should appear as well when the grid's width is less than the total MinWidth of all columns in case of ColumnGroupsViewDefinition.

Workaround: use GridViewAutoSizeColumnsMode.None and handle the RadGridView.SizeChanged event where you can adjust manually the Width of the visible columns on a way to simulate GridViewAutoSizeColumnsMode.Fill. Here is a sample approach:

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

    this.radGridView1.DataSource = this.customersBindingSource;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.None;

    foreach (GridViewColumn col in this.radGridView1.Columns)
    {
        col.MinWidth = 100;
    }

    ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
    view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));
    view.ColumnGroups.Add(new GridViewColumnGroup("Details"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Address"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Contact"));
    view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["CompanyName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactTitle"]);

    view.ColumnGroups[1].Groups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Address"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["City"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Country"]);

    view.ColumnGroups[1].Groups[1].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Phone"]);
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Fax"]);
    radGridView1.ViewDefinition = view;

    radGridView1.SizeChanged += radGridView1_SizeChanged;
}

private void radGridView1_SizeChanged(object sender, EventArgs e)
{
    int totalMinimumWidth = 0;
    int columnsCount = ColumnsCountWidth(out totalMinimumWidth);
    int delta = this.radGridView1.Width - totalMinimumWidth;
    AdjustColumnWidth(delta / columnsCount);
}

private void AdjustColumnWidth(int widthToAdd)
{
    ColumnGroupsViewDefinition view = this.radGridView1.ViewDefinition as ColumnGroupsViewDefinition;
    if (view == null)
    {
        return;
    }

    foreach (GridViewColumnGroup group in view.ColumnGroups)
    {
        AdjustColumnsInGroup(widthToAdd, group);
    }
}

private void AdjustColumnsInGroup(int widthToAdd, GridViewColumnGroup group)
{
    if (group.Groups.Count == 0)
    {
        foreach (GridViewColumnGroupRow row in group.Rows)
        {
            foreach (GridViewColumn col in row.Columns)
            {
                col.Width += widthToAdd;
            }
        }
    }
    else
    {
        foreach (GridViewColumnGroup g in group.Groups)
        {
            AdjustColumnsInGroup(widthToAdd, g);
        }
    }
}

private int ColumnsCountWidth(out int totalMinWidth)
{
    int columnsCount = 0;
    totalMinWidth = 0;
    ColumnGroupsViewDefinition view = this.radGridView1.ViewDefinition as ColumnGroupsViewDefinition;
    if (view == null)
    {
        return this.radGridView1.Columns.Count;
    }

    foreach (GridViewColumnGroup group in view.ColumnGroups)
    {
        columnsCount = IterateGroups(columnsCount, group, ref totalMinWidth);              
    }
    return columnsCount;
}

private static int IterateGroups(int columnsCount, GridViewColumnGroup group, ref int totalMinWidth)
{
    int count = columnsCount;
    if (group.Groups.Count == 0)
    {
        foreach (GridViewColumnGroupRow row in group.Rows)
        {
            count += row.Columns.Count;
            foreach (GridViewColumn col in row.Columns)
            {
                totalMinWidth += col.Width;
            }
        }
    }
    else
    {
        foreach (GridViewColumnGroup g in group.Groups)
        {
            count = IterateGroups(count, g, ref totalMinWidth);
        }
    }
    return count;
}
Completed
Last Updated: 14 Oct 2015 12:29 by ADMIN
Please refer to the attached screenshot.

Workaround: either select the RadGridView node in the Property Builder, or use the VS design time or control Smart Tag to set DataSource
Completed
Last Updated: 18 Jun 2015 10:37 by ADMIN
To reproduce :
- Set conditional formatting for all grid cells.
- Iterate all grid cells and set their value.

Workaround:
Use Begin/End update block.
Completed
Last Updated: 13 Oct 2015 10:28 by ADMIN
To reproduce:
- Add grid with several columns and set their AllowResize property to false.
- Set the FitWidthMode to FitPageWidth.
- Print the grid and you will notice that some of the columns are cut off.
 
Workaround:
- Set the AllowResize property to true before printing.
Completed
Last Updated: 13 Oct 2015 06:56 by ADMIN
To reproduce:
- Enter a value in the search row (make sure you will have several results)
- Enter a letter in the filtering row. The filetring row will lose the focus.

Workaround:
public class MyGridViewSearchRowInfo : GridViewSearchRowInfo
{
    public MyGridViewSearchRowInfo(GridViewInfo viewInfo) : base(viewInfo)
    {
    }

    public override void SelectNextSearchResult()
    {
        GridViewSystemRowInfo systemRow = this.ViewTemplate.MasterTemplate.CurrentRow as GridViewSystemRowInfo;

        if (systemRow != null && this.ViewTemplate.MasterTemplate.Owner.EditorManager.IsInEditMode)
        {
            return;
        }
        base.SelectNextSearchResult();
    }
}

//change the default row like this
void radGridView1_CreateRowInfo(object sender, GridViewCreateRowInfoEventArgs e)
{
    if (e.RowInfo is GridViewSearchRowInfo)
    {
        e.RowInfo = new MyGridViewSearchRowInfo(e.ViewInfo);
    }
}

Completed
Last Updated: 01 Jun 2015 11:12 by ADMIN
To reproduce: following the illustrated steps: http://screencast.com/t/D2TCpU2zo

Workaround: set up the hierarchy programmatically.
Completed
Last Updated: 15 Sep 2015 07:44 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn("Select");
    checkBoxColumn.EnableHeaderCheckBox = true;
    radGridView1.MasterTemplate.Columns.Insert(0, checkBoxColumn);

    for (int i = 0; i < 10; i++)
    {
        this.radGridView1.Rows.Add(false);
    }
    this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

    this.radGridView1.MultiSelect = true;
    this.radGridView1.HeaderCellToggleStateChanged += radGridView1_HeaderCellToggleStateChanged;
}

private void radGridView1_HeaderCellToggleStateChanged(object sender, GridViewHeaderCellEventArgs e)
{
    if (e.State.ToString() == "On")
        this.radGridView1.SelectAll();
    else
        this.radGridView1.ClearSelection();
}


Workaround 1:
private void radGridView1_HeaderCellToggleStateChanged(object sender, GridViewHeaderCellEventArgs e)
{
    bool selected = e.State.ToString() == "On";

    foreach (GridViewRowInfo r in this.radGridView1.Rows)
    {
        r.IsSelected = selected;
    }
}

Workaround 2:

private void radGridView1_MouseUp(object sender, MouseEventArgs e)
{
    RadCheckBoxElement el = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as RadCheckBoxElement;
    if (el!=null)
    {
        GridCheckBoxHeaderCellElement headerCell = el.Parent as GridCheckBoxHeaderCellElement;
        bool selected = el.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On;
        if (headerCell!=null)
        {
            if (selected)
            {
                this.radGridView1.SelectAll();
            }
            else
            {
                this.radGridView1.ClearSelection();
            }
        }
    }
}
Unplanned
Last Updated: 30 Mar 2016 08:02 by ADMIN
To reproduce:

GridViewMultiComboBoxColumn supplierColumn = new GridViewMultiComboBoxColumn();
supplierColumn.SyncSelectionWithText = true;
supplierColumn.Name = "SupplierColumn";
supplierColumn.HeaderText = "Supplier";
supplierColumn.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
supplierColumn.AutoCompleteMode = AutoCompleteMode.Append;
supplierColumn.DataSource = this.suppliersBindingSource;
supplierColumn.ValueMember = "SupplierID";
supplierColumn.DisplayMember = "ContactName";
supplierColumn.FieldName = "SupplierID";
supplierColumn.Width = 200;
this.radGridView1.Columns.Add(supplierColumn);

Select the new row and try to enter some text that is not valid and press Enter. You will notice the new row is added with the last valid auto-completed value.

Workaround: cancel the UserAddingRow event if the entered text is not valid.
Completed
Last Updated: 19 Jun 2015 05:13 by Purvi
To reproduce:

this.radGridView1.DataSource = this.ordersBindingSource;
GridViewDateTimeColumn col = this.radGridView1.Columns["OrderDate"] as GridViewDateTimeColumn;
col.ExcelExportType = DisplayFormatType.GeneralDate;
col.ExcelExportFormatString = "dd-MMM-yy";

private void radButton1_Click(object sender, EventArgs e)
{
    SpreadExport spreadExporter = new SpreadExport(radGridView1);
    spreadExporter.RunExport(@"..\..\..\exportedFileQ12015.xlsx");

    Process.Start(@"..\..\..\exportedFileQ12015.xlsx");
}

Workaround:

private void radButton1_Click(object sender, EventArgs e)
{
    SpreadExport spreadExporter = new SpreadExport(radGridView1);
    spreadExporter.CellFormatting += spreadExporter_CellFormatting;
    spreadExporter.RunExport(@"..\..\..\exportedFileQ12015.xlsx");

    Process.Start(@"..\..\..\exportedFileQ12015.xlsx");
}

private void spreadExporter_CellFormatting(object sender, Telerik.WinControls.UI.Export.SpreadExport.CellFormattingEventArgs e)
{
    if (e.GridColumnIndex == 3 && e.GridCellInfo.Value is DateTime)
    {
        CellValueFormat cvf = new CellValueFormat("dd-MMM-yy");
        e.CellSelection.SetFormat(cvf);
    }
}
Unplanned
Last Updated: 30 Mar 2016 08:01 by ADMIN
To reproduce:

1. Populate RadGridView with data
2. Export the grid by using the SpreadExport
3. Open the produce Excel file and select  some cells to generate a chart in Excel. You will notice that it is not possible to create a complete chart with the selected data.

Workaround: use the ExportToExcelML >> http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-excel-via-excelml-format.html 
Completed
Last Updated: 13 Oct 2015 08:08 by ADMIN
To reproduce:
- Set the cell's BackColor in an entire column.
- Set the cell's Forecolor in another column. 
- Change the grid size to the columns are hidden and then shown again.

Workaround:
Change similar properties for all the cells where the Style property is used or use CellFormatting.
Completed
Last Updated: 18 Sep 2015 14:51 by ADMIN
To reproduce:
- Add two child templates to a grid.
- Add summary rows to both of them 
- Change the value of the child template.

Workaround:
- Clear and add back the summary rows when a value in the child template is changed. 
Completed
Last Updated: 14 Apr 2016 14:23 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 1
Category: GridView
Type: Feature Request
1
When the RadGridView.EnabledPaging property is set to true, the user should be allowed to specify not only the PageSize,but also the PagesCount for example. Afterwards, it would be convenient to have an event similar to RowSourceNeeded in order to load pages data on demand.
Completed
Last Updated: 08 Jun 2015 07:38 by ADMIN
To reproduce:
private void Form1_Load(object sender, EventArgs e)
{
    this.customersTableAdapter.Fill(this.nwindDataSet.Customers);
    this.radGridView1.DataSource = this.customersBindingSource;
    this.radGridView1.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.AllCells);
    this.radGridView1.AllowSearchRow = true;
}

Workaround:
private void Form1_Load(object sender, EventArgs e)
{
    RadDragDropService svc = this.radGridView1.GridViewElement.GetService<RadDragDropService>();
    svc.PreviewDragDrop += svc_PreviewDragDrop;
}

private void svc_PreviewDragDrop(object sender, RadDropEventArgs e)
{
    GridViewSearchRowInfo.Cancel = true;
}
Completed
Last Updated: 08 Jun 2015 13:16 by ADMIN
To reproduce:

BindingList<Item> items = new BindingList<Item>();

public Form1()
{
    InitializeComponent();

    Item dataItem1 = new Item(1);
    dataItem1.Name = "Cat";
    dataItem1.GroupName = "Animal";
    dataItem1.GroupSortPriority = 2;
    items.Add(dataItem1);
    Item dataItem2 = new Item(2);
    dataItem2.Name = "Kitten";
    dataItem2.GroupName = "Animal";
    dataItem2.GroupSortPriority = 2;
    dataItem2.ParentIndex = 1;
    items.Add(dataItem2);
    Item dataItem3 = new Item(3);
    dataItem3.Name = "Trout";
    dataItem3.GroupName = "Fish";
    dataItem3.GroupSortPriority = 1;
    items.Add(dataItem3);
    radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "Index", "ParentIndex");
    radGridView1.DataSource = items;
}

private void ExpandSomeGroups()
{
    foreach (DataGroup group in radGridView1.Groups)
    {
        if (group.GroupRow.HeaderText.Contains("Animal"))
        {
            if (group.IsExpanded)
            {
                group.Collapse(false);
            }
            else
            {
                group.Expand(true);
            }
        }
    }
}

public class Item
{
    public Item(int index)
    {
        Index = index;
    }

    public int Index { get; private set; }

    public int ParentIndex { get; set; }

    public string Name { get; set; }

    public string GroupName { get; set; }

    public int GroupSortPriority { get; set; }
}



private void Form1_Load(object sender, EventArgs e)
{ 
    GroupDescriptor descriptor = new GroupDescriptor();
    descriptor.GroupNames.Add("GroupName", ListSortDirection.Ascending);
    radGridView1.GroupDescriptors.Add(descriptor);

    ExpandSomeGroups();
}

You will notice that the "Animal" group is not expanded. However, if you remove the self-referencing hierarchy, the "Animal" group will be expanded.