Declined
Last Updated: 05 Jun 2015 10:25 by ADMIN
1. Create a new project with RadGridView.
2. Bind it.
3. Add some filter descriptors.
4. Handle the CustomFiltering event and add custom filter for some column.
5. Run the project and you will see that all other filters are not applied.
Declined
Last Updated: 05 Jun 2015 09:18 by ADMIN
When you use a custom GroupComparer for the MasterTemplate, grouping is performed successfully for the first time. However, if you remove all groups and perform grouping again for the same columns, the grid behavior is not as expected: you will notice groups mismatching or duplication. Here is a sample code snippet which incorrect behavior is illustrated on the attached gif file:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();
    dt.Columns.Add("Reference");
    dt.Columns.Add("Test Case");
    dt.Columns.Add("ChBW");
    dt.Columns.Add("Voltage");
    dt.Columns.Add("Environmental Conditions");
    dt.Columns.Add("RadioAccessTechnology");

    dt.Rows.Add("4.2.1", "E-Utran FDD...", "10", "C Nominal-2", "T Nominal - V Nominal", "E-UTRAN Only");
    dt.Rows.Add("5.2.1", "E-Utran FDD...", "3", "C Nominal-1", "T Nominal - V Nominal", "E-UTRAN Only");
    dt.Rows.Add("14.2.1", "E-Utran FDD...", "1", "C Nominal-3", "T Nominal - V Nominal", "E-UTRAN Only");
    dt.Rows.Add("2.2.1", "E-Utran FDD...", "4", "C Nominal-2", "T Nominal - V Nominal", "E-UTRAN Only");
    dt.Rows.Add("7.2.1", "E-Utran FDD...", "12", "C Nominal-1", "T Nominal - V Nominal", "E-UTRAN Only");
    dt.Rows.Add("2.2.1", "E-Utran FDD...", "2", "C Nominal-3", "T Nominal - V Nominal", "E-UTRAN Only");

    this.radGridControlSelection.DataSource = dt;
    this.radGridControlSelection.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

    this.radGridControlSelection.MasterTemplate.GroupComparer = new GroupComparer();
}

public class GroupComparer : IComparer<Group<GridViewRowInfo>>
{
    public int Compare(Group<GridViewRowInfo> x, Group<GridViewRowInfo> y)
    {
        if (x.Level != y.Level)
        {
        }
        DataGroup group = x as DataGroup;

        var a = x.Header;
        var b = y.Header;

        int valueA;
        int valueB;

        if (group == null)
        {
            group = y as DataGroup;
        }
        if (group != null && group.GroupDescriptor != null && group.GroupDescriptor.GroupNames.Count > 0)
        {
            string propertyName = group.GroupDescriptor.GroupNames.First().PropertyName;
            if ((propertyName.ToUpper() == "VOLTAGE"))
            {
                int indexA = GetIndexContain(a.ToString().Split(new char[] { '-' })[1]);
                int indexB = GetIndexContain(b.ToString().Split(new char[] { '-' })[1]);

                if (indexA == indexB)
                {
                    return 0;
                }
                else if (indexA < indexB)
                {
                    return -1;
                }
                else
                {
                    return 1;
                }
            }
            else if (propertyName.ToUpper() == "RADIOACCESSTECHNOLOGY")
            {
                return x.Key.ToString().CompareTo(y.Key.ToString());
            }
            // BAND
            else if (propertyName.ToUpper() == "CHBW")
            {
                Int32.TryParse(a, out valueA);
                Int32.TryParse(b, out valueB);

                //ASCENDING SELECTED
                if (group.GroupDescriptor.GroupNames.First().Direction == ListSortDirection.Ascending)
                {
                    if (valueA > valueB)
                    {
                        return 1;
                    }
                    else if (valueA < valueB)
                    {
                        return -1;
                    }
                    else
                    {
                        return 0;
                    }
                }
                //DESCENDING
                else
                {
                    if (valueA > valueB)
                    {
                        return -1;
                    }
                    else if (valueA < valueB)
                    {
                        return 1;
                    }
                    else
                    {
                        return 0;
                    }
                }
            }
        }
        return x.Key.ToString().CompareTo(y.Key.ToString());
    }

    private int GetIndexContain(string a)
    {
        int parsedValue;
        if (int.TryParse(a, out parsedValue))
        {
            return 10 - parsedValue;
        }
        return -1;
    }
}


Workaround:

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

    protected override RadGridViewElement CreateGridViewElement()
    {
        return new CustomGridViewElement();
    }
}

public class CustomGridViewElement : RadGridViewElement
{
    protected override Type ThemeEffectiveType     
    { 
        get    
        { 
            return typeof(RadGridViewElement);     
        }
    }

    protected override MasterGridViewTemplate CreateTemplate()
    {
        return new CustomMasterGridViewTemplate();
    }
}

public class CustomMasterGridViewTemplate : MasterGridViewTemplate
{
    protected override GridViewListSource CreateListSource()
    {
        return new CustomGridViewListSource(this);
    }
}

public class CustomGridViewListSource : GridViewListSource
{
    public CustomGridViewListSource(GridViewTemplate template) : base(template)
    {
    }

    protected override RadCollectionView<GridViewRowInfo> CreateDefaultCollectionView()
    {
        return new CustomGridDataView(this);
    }
}

public class CustomGridDataView : GridDataView
{
    public CustomGridDataView(GridViewListSource listSource) : base(listSource)
    {
    }

    protected override GroupBuilder<GridViewRowInfo> CreateGroupBuilder()
    {
        return new CustomGroupBuilder(this.Indexer);
    }
}

public class CustomGroupBuilder : GridGroupBuilder
{
    public CustomGroupBuilder(Index<GridViewRowInfo> index) : base(index)
    {
    }

    protected override Group<GridViewRowInfo> GetGroup(GroupCollection<GridViewRowInfo> cache,
        Group<GridViewRowInfo> newGroup, Group<GridViewRowInfo> parent, object key, int level)
    {
        GroupDescriptor currentDescriptor = this.CollectionView.GroupDescriptors[level];
        DataGroup group = (DataGroup)base.GetGroup(null, newGroup, parent, key, level);
        if (group.GroupDescriptor != null && group.GroupDescriptor != currentDescriptor)
        {
            SetGroupDescriptor(group, null);
            IGroupFactory<GridViewRowInfo> groupFactory = this.CollectionView.GroupFactory;
            group = (DataGroup)groupFactory.CreateGroup(key, parent);
            group.GroupBuilder = this;
        }
        SetGroupDescriptor(group, currentDescriptor);
        return group;
    }

    private void SetGroupDescriptor(DataGroup dataGroup, GroupDescriptor currentDescriptor)
    {
        FieldInfo fi = typeof(DataGroup).GetField("groupDescriptor", BindingFlags.NonPublic | BindingFlags.Instance);
        fi.SetValue(dataGroup, currentDescriptor);
    }
}
Completed
Last Updated: 05 Jun 2015 08:51 by ADMIN
To reproduce, use the following code and afterwards check the CurrentRow.Index property:
            this.grid.BeginUpdate();
            GridViewDataRowInfo newRow = new GridViewDataRowInfo(grid.MasterView);
            this.grid.Rows.Add(newRow);
            this.grid.EndUpdate();

Workaround:
radGridView1.Rows.IndexOf(radGridView1.CurrentRow);
Declined
Last Updated: 05 Jun 2015 08:32 by ADMIN
To reproduce:
void radGridView1_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
        {
            e.CurrentRow.Cells[2].ColumnInfo.IsCurrent = true;
        }
Completed
Last Updated: 05 Jun 2015 07:47 by ADMIN
Excel like filtering does not select dates in the Calendar, when During last 7 day or Yesterday are checked.
Completed
Last Updated: 04 Jun 2015 13:43 by ADMIN
Workaround - listen for Reset of the rows collection and introduce your modification there:

        radGridView1.Rows.CollectionChanged += Rows_CollectionChanged;

        void Rows_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
        {
            if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Reset)
            {
                foreach (GridViewRowInfo row in radGridView1.Rows)
                {
                    row.Cells[0].Value = false;
                }
            }
        }
Completed
Last Updated: 04 Jun 2015 13:38 by ADMIN
To reproduce:
private void Form1_Load(object sender, EventArgs e)
{
    GridSearchRowElement searchRow = null;
    foreach (GridRowElement row in this.radGridView1.TableElement.VisualRows)
    {
        if (row is GridSearchRowElement)
        {
            searchRow = row as GridSearchRowElement;
            break;
        }
    }
    if (searchRow != null)
    {

        searchRow.SearchCellElement.SearchBoxWidth = 400;
    }
}

Workaround:
radGridView1.TableElement.InvalidateMeasure(true);           
radGridView1.TableElement.UpdateLayout();
 
Completed
Last Updated: 03 Jun 2015 11:04 by ADMIN
Steps to reproduce:

1. Drag a RadGridView to a form
2. Add a text column and a hyperlink column
3. Add a row with null value for the hyperlink cell
4. Set some text for the hyperlink cell
5. Subscribe to the HyperlinkOpening/ed events 
6. Run the project and click on the hyperlink, you will see that none of the events will be fired.

Workaround:
To work around it, you can create your own cell element which derives from the GridHyperlinkCellElement and override the ProcessHyperlink method to handle the user clicking on a hyperlink:
public class MyHyperlinkCellElement : GridHyperlinkCellElement
{
    public MyHyperlinkCellElement(GridViewColumn col, GridRowElement row)
        : base(col, row)
    { }
 
    protected override void ProcessHyperlink()
    {
        //handle hyperlink click           
    }
}

After you have created your cell element, you can replace the original using the CreateCell event of the RadGridView:
private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.Column is GridViewHyperlinkColumn)
    {
        e.CellType = typeof(MyHyperlinkCellElement);
    }
}
Completed
Last Updated: 01 Jun 2015 14:47 by ADMIN
To reproduce: use the following code snippet and follow the steps illustrated on the attached gif file:

private void Form1_Load(object sender, EventArgs e)
{
    this.customersTableAdapter.Fill(this.nwindDataSet.Customers);
    this.radGridView1.DataSource = this.customersBindingSource;
    this.radGridView1.BestFitColumns(BestFitColumnMode.AllCells);
    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;
}

Sometimes the incorrect behavior is obtained immediately after you drop the column, but you need to scroll the horizontal scroll-bar to replicate it.

Workaround:
RadGridViewDragDropService svc = this.radGridView1.GridViewElement.GetService<RadGridViewDragDropService>();
svc.Stopped += svc_Stopped;

private void svc_Stopped(object sender, EventArgs e)
{
    int horizontalScrollvalue = this.radGridView1.TableElement.HScrollBar.Value;
    this.radGridView1.MasterTemplate.Refresh();
    this.radGridView1.TableElement.HScrollBar.Value = horizontalScrollvalue;
}

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: 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
Completed
Last Updated: 01 Jun 2015 07:43 by ADMIN
Allow setting the height of the group panel in design time:
 - by setting its height property
 - by using mouse cursor via property builder
Completed
Last Updated: 01 Jun 2015 07:09 by ADMIN
RadGridView - You cannot select cells only from Pinned Columns if under them there is unpinned one.

Steps to reproduce:
1. Set SelectionMode property of RadGridView to GridViewSelectionMode.CellSelect.
2. Create 3 left pinned columns
3. Create several unpinned columns.
4. Scroll horizontal scroll bar to hide several unpinned columns under the pinned.
5. Try to select only pinned cells with the selection rectangle.
Completed
Last Updated: 01 Jun 2015 06:58 by ADMIN
Add the ability to filter by empty values (not null values) just like in excel.
Completed
Last Updated: 28 May 2015 09:57 by ADMIN
A user should be able to disable executing any of the cut/copy/paste (ctrl+x, ctrl+c, ctrl+v) commands.
Completed
Last Updated: 28 May 2015 07:01 by ADMIN
RadGridView If FilteringMode is set to DisplayMember if one clicks in the ComboBoxColumn cell; the actual cell value goes blank. If FilteringMode is set to ValueMember the ComboBoxColumn behaves as expected.

Workaround:
Private Sub RadGridView1_CellEditorInitialized(sender As Object, e As GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized
    If e.ActiveEditor.GetType() Is GetType(RadDropDownListEditor) Then
        e.ActiveEditor.Value = e.Value
    End If
End Sub
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: 28 May 2015 06:09 by ADMIN
One should be able to replace the exported file if such exists.
Completed
Last Updated: 28 May 2015 05:53 by Svetlin
Filtering is applied, if you clear the filter descriptors and enable/disable custom filtering. Steps to reproduce:

1. Click on the filter button on the Name header.  Check only one name, and only one record should be visible in the grid.
2.  Click the Clear button.  All records should now be visible.
3.  Click the Toggle Filter button once, to enable custom filtering.  
4.  Click the Toggle Filter button again to disable custom filtering.

Workaround:

private static readonly FieldInfo FilterContextFieldInfo = typeof(RadCollectionView<GridViewRowInfo>).GetField("filterContext", BindingFlags.NonPublic | BindingFlags.Instance);

this.radGridView1.FilterDescriptors.Clear();
            StringCollection filterContext = FilterContextFieldInfo.GetValue(this.radGridView1.MasterTemplate.DataView) as StringCollection;
            filterContext.Clear();
Completed
Last Updated: 27 May 2015 13:18 by Ruth Goldberg
To reproduce:
-add a RadGridView and bind it to Northwind.Customers datatable.
-try to edit a random row and change its CustomerID cell to an already existing one.

Workaround: use custom GridViewDataRowInfo:

public class CustomRowInfo : GridViewDataRowInfo
{
    public CustomRowInfo(GridViewInfo viewInfo) : base(viewInfo)
    {
    }

    protected override bool OnEndEdit()
    {
        IEditableObject dataItem = this.DataBoundItem as IEditableObject;
        if (dataItem != null)
        {
            try
            {
                dataItem.EndEdit();
            }
            catch (Exception ex)
            {
                this.ViewTemplate.SetError(new GridViewCellCancelEventArgs(null,null, null), ex);
            }
        }
    
        return base.OnEndEdit();
    }
}