Unplanned
Last Updated: 16 May 2019 05:10 by ADMIN
How to reproduce:

1. Click DrugName Filter Icon.
2. Uncheck Combivent
3. OK
4. Click name Filter Icon
5. Uncheck Christoff
6. OK
7. Click DrugName Filter Icon
8. Uncheck Dilantin
9. OK

In this scenario the grid should display only 2 rows but it displays 3.

public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public List<Drug> DrugList { get; set; }

    public RadForm1()
    {
        InitializeComponent();
        DrugList = new List<Drug>();
        LoadDrugList();
        radGridView1.DataSource = DrugList;
        radGridView1.EnableFiltering = true;

        this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
        this.radGridView1.MultiSelect = true;
    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

        radGridView1.MasterTemplate.ShowFilteringRow = false;
        radGridView1.MasterTemplate.ShowHeaderCellButtons = true;
    }

    void LoadDrugList()
    {
        DrugList.Add(new Drug { Dosage = 25, DrugName = "Indocin", Name = "David"});
        DrugList.Add(new Drug { Dosage = 50, DrugName = "Enebrel", Name = "Sam" });
        DrugList.Add(new Drug { Dosage = 10, DrugName = "Hydralazine", Name = "Christoff"});
        DrugList.Add(new Drug { Dosage = 21, DrugName = "Combivent", Name = "Janet"});
        DrugList.Add(new Drug { Dosage = 100, DrugName = "Dilantin", Name = "Melanie"});
    }

}

Workaround: use a custom filter popup
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public List<Drug> DrugList { get; set; }

    public RadForm1()
    {
        InitializeComponent();
        DrugList = new List<Drug>();
        LoadDrugList();
        radGridView1.DataSource = DrugList;
        radGridView1.EnableFiltering = true;

        this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
        this.radGridView1.MultiSelect = true;

        this.radGridView1.FilterPopupRequired += RadGridView1_FilterPopupRequired;
    }

    private void RadGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e)
    {
        e.FilterPopup = new CustomRadListFilterPopup(e.Column);
    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

        radGridView1.MasterTemplate.ShowFilteringRow = false;
        radGridView1.MasterTemplate.ShowHeaderCellButtons = true;
    }

    void LoadDrugList()
    {
        DrugList.Add(new Drug { Dosage = 25, DrugName = "Indocin", Name = "David"});
        DrugList.Add(new Drug { Dosage = 50, DrugName = "Enebrel", Name = "Sam" });
        DrugList.Add(new Drug { Dosage = 10, DrugName = "Hydralazine", Name = "Christoff"});
        DrugList.Add(new Drug { Dosage = 21, DrugName = "Combivent", Name = "Janet"});
        DrugList.Add(new Drug { Dosage = 100, DrugName = "Dilantin", Name = "Melanie"});
    }

}

public class CustomRadListFilterPopup : RadListFilterPopup
{
    public CustomRadListFilterPopup(GridViewDataColumn dataColumn) 
        : base(dataColumn)
    {
    }

    protected override void OnButtonOkClick(EventArgs e)
    {
        FilterMenuTreeItem treeMenuItem = this.Items.FirstOrDefault(i => i is FilterMenuTreeItem) as FilterMenuTreeItem;
        if (treeMenuItem == null)
        {
            base.OnButtonOkClick(e);
        }

        FilterMenuTreeElement listFilterElement = treeMenuItem.TreeElement;

        FilterOperator filterOperator = FilterOperator.IsEqualTo;

        switch (listFilterElement.SelectedMode)
        {
            case ListFilterSelectedMode.All:
                filterOperator = FilterOperator.None;
                break;
            case ListFilterSelectedMode.Null:
                filterOperator = FilterOperator.IsNull;
                break;
            case ListFilterSelectedMode.NotNull:
                filterOperator = FilterOperator.IsNotNull;
                break;
        }

        if (filterOperator != FilterOperator.IsEqualTo)
        {
            SetFilterOperator(filterOperator);
            this.ClosePopup(RadPopupCloseReason.CloseCalled);
        }
        else
        {
            CompositeFilterDescriptor compositeFilterDescriptor = new CompositeFilterDescriptor();
            compositeFilterDescriptor.PropertyName = this.DataColumn.Name;
            RadListFilterDistinctValuesTable distinctValues = this.GetDistinctValuesTable();
            string blanksKey = RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.FilterMenuBlanks);
            bool blanks = listFilterElement.SelectedValues.Contains(blanksKey);
            compositeFilterDescriptor.LogicalOperator = FilterLogicalOperator.And;

            foreach (DictionaryEntry entry in distinctValues)
            {
                object key = entry.Key;

                if (string.IsNullOrEmpty(Convert.ToString(key)))
                {
                    key = blanksKey;
                }

                if (this.DataColumn is GridViewDateTimeColumn || this.DataColumn.DataType == typeof(DateTime) || this.DataColumn.DataType == typeof(DateTime?))
                {
                    DateTime dateTime;

                    if (DateTime.TryParse(key.ToString(), out dateTime))
                    {
                        object dataKey;
                        if (RadDataConverter.Instance.TryFormat(treeMenuItem.TreeElement.GroupedDateValues ? dateTime.Date : dateTime, typeof(string), this.DataColumn, out dataKey) == null)
                        {
                            key = dataKey;
                        }
                    }
                }

                if (!listFilterElement.SelectedValues.Contains(key))
                {
                    foreach (object value in (ArrayList)entry.Value)
                    {
                        FilterDescriptor descriptor;
                        if (value == DBNull.Value)
                        {
                            descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, null);
                        }
                        else if (this.DataColumn is GridViewDateTimeColumn || this.DataColumn.DataType == typeof(DateTime) || this.DataColumn.DataType == typeof(DateTime?))
                        {
                            descriptor = new DateFilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, (DateTime?)value, false);
                        }
                        else
                        {
                            descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, value);
                        }

                        compositeFilterDescriptor.FilterDescriptors.Add(descriptor);
                    }
                }
            }

            if (this.DataColumn.FilterDescriptor != null)
            {
                CompositeFilterDescriptor compositeFilter = this.DataColumn.FilterDescriptor as CompositeFilterDescriptor;
                if (compositeFilter != null)
                {
                    foreach (var item in compositeFilter.FilterDescriptors)
                    {
                        if (listFilterElement.SelectedValues.Contains(item.Value))
                        {
                            continue;
                        }

                        FilterDescriptor descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, item.Value);
                        compositeFilterDescriptor.FilterDescriptors.Add(descriptor);
                    }
                }
                else if(!listFilterElement.SelectedValues.Contains(this.DataColumn.FilterDescriptor.Value))
                {
                    FilterDescriptor descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, this.DataColumn.FilterDescriptor.Value);
                    compositeFilterDescriptor.FilterDescriptors.Add(descriptor);
                }
            }
            this.FilterDescriptor = compositeFilterDescriptor;

            OnFilterConfirmed();
        }
    }
}
Unplanned
Last Updated: 16 May 2019 05:02 by ADMIN
Workaround:

        private void radGridView1_ConditionalFormattingFormShown(object sender, EventArgs e)
        {
            ConditionalFormattingForm f = sender as ConditionalFormattingForm;
            if (f != null)
            {
                f.Width += 5;
            }
        }
Unplanned
Last Updated: 14 May 2019 12:56 by ADMIN
============================
Attached files (in Grid.zip)
============================
- SQL Server 2014 Express - Create DB.sql                 - Create the database Telerik
- SQL Server 2014 Express - Create tables.sql             - Create tables and insert test data
- Database relations.PNG                                           - Graphical view from Visual Studio
- Error messages when trying to open Property Builder.PNG

============================  
How to reproduce the problem
============================
- Create the database and tables (including data) with attached sql files
- Create a WinForms application with an empty RadForm
- Add a new data source to the project and select the created Telerik DB with all tables
- Add a RadGridView to the form
- Create an event handler for the form Load event handler
- Add a TelerikDataSet to the form
- Add an ObjectTableAdapter to the form
- Fill the created adapter from table Object in the form Load event handler
- Add a binding source to the form and set data source to the data set and the member to table Object
- Select radGridView1 and set data source to the created binding source object. Data member is left empty.
- Open Property Builder and press the Build button and create details views
- Run project. Everything looks ok.
- Stop running.
- Select radGridView1 and try to open Property Builder. An error message is generated (see attached file Error messages...
- Save changes and exit studio. Studio is hanging and the process must be kiled.


Unplanned
Last Updated: 14 May 2019 06:18 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 1
Category: GridView
Type: Bug Report
4
To reproduce:
Add a RadGridView and use the following code. When you expand the first row, the vertical scrollbar is not correct. Scrolling down changes its size. However, if you expand the last row, it takes few seconds to open.

Second scenario:
In addition of the following code, if you change the TableElement.PageViewMode to PageViewMode.ExplorerBar, expanding the first row takes few seconds to load the hierarchical data as well.

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

        List<Item> items = new List<Item>();
        List<SubItem> subItems = new List<SubItem>();

        for (int i = 1; i <= 3; i++)
        {
            Item item = new Item(i, "Item" + i);
            
            for (int j = 1000; j <= 2010; j++)
            {
                subItems.Add(new SubItem(j, "SubItem" + j, i));
            }

            items.Add(item);
        }

        this.radGridView1.DataSource = items;
        this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

        GridViewTemplate template = new GridViewTemplate();
        template.ReadOnly = true;
        template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

        GridViewRelation relation = new GridViewRelation(this.radGridView1.MasterTemplate, template);
        relation.ParentColumnNames.Add("Id");
        relation.ChildColumnNames.Add("ItemId");
        this.radGridView1.MasterTemplate.Templates.Add(template);
        this.radGridView1.Relations.Add(relation);
        template.DataSource = subItems;
    }
}

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

    public string Title { get; set; }

    public Item(int id, string title)
    {
        this.Id = id;
        this.Title = title;
    }
}

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

    public int ItemId { get; set; }

    public string Name { get; set; }
    
    public SubItem(int id, string name, int itemId)
    {
        this.Id = id;
        this.ItemId = itemId;
        this.Name = name;
    }
}
Unplanned
Last Updated: 13 May 2019 11:54 by ADMIN
Created by: Roman
Comments: 5
Category: GridView
Type: Bug Report
2

Hello,

I am having issues with DateTime editor in the grid. We have custom date/time format for our dates - "HH:mm:ss dd-MMM-yyyy" and the datetime editor is set to free form date time with this mask. When user typed a value in the editor it is passed to FreeFormDateTimeProvider.Validate method, which calls DateInput.ParseDate. DateTimeLexer splits this kind of values just fine, but obviously time related tokens comes first and then the date related tokens.

Unfortunately DateTimeParser.Parse method is made the way that it parse date at first and then time from the tokens list. In my case this means time value is parsed and the date value is dropped to default. Why didn't you check that if after ParseDate and ParseTime calls the date portion is null but there are still remaining tokens in the list, so you may call ParseDate one more time?

Do you have any suggestion how could I resolve this issue? Everything related to date time parsing is not extendable at all, starting from DateInput, most of the classes and methods are not public and even some public methods are not virtual. Can I have the Telerik free form date time typing capabilities in the editor but still have time part before date part?

Unplanned
Last Updated: 29 Mar 2019 16:16 by ADMIN
When UseCompatibleTextRendering property is set to false, the data cells overlaps the row header cells when horizontal scrolling is performed.
Unplanned
Last Updated: 29 Mar 2019 13:48 by ADMIN

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

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

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

Regards

Erwin

Unplanned
Last Updated: 19 Mar 2019 10:29 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 2
Category: GridView
Type: Bug Report
7
To reproduce: use the following code snippet, save the layout and load it afterwards. You will notice that only the master and the first child template are successfully loaded.

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

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

    //child level 1
    GridViewTemplate template = new GridViewTemplate();
    template.DataSource = GetData(5, 20, 0, 5);
    template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    radGridView1.MasterTemplate.Templates.Add(template);

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

    //child level 2
    GridViewTemplate template2 = new GridViewTemplate();
    template2.DataSource = GetData(20, 40, 5, 20);
    template2.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    template.Templates.Add(template2);

    GridViewRelation relation2 = new GridViewRelation(template);
    relation2.ChildTemplate = template2;
    relation2.RelationName = "ParentChild";
    relation2.ParentColumnNames.Add("Id");
    relation2.ChildColumnNames.Add("ParentId");
    radGridView1.Relations.Add(relation2);

    //child level 3
    GridViewTemplate template3 = new GridViewTemplate();
    template3.DataSource = GetData(40, 100, 20, 40);
    template3.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    template2.Templates.Add(template3);

    GridViewRelation relation3 = new GridViewRelation(template2);
    relation3.ChildTemplate = template3;
    relation3.RelationName = "ParentChild";
    relation3.ParentColumnNames.Add("Id");
    relation3.ChildColumnNames.Add("ParentId");
    radGridView1.Relations.Add(relation3);

    //child level 4
    GridViewTemplate template4 = new GridViewTemplate();
    template4.DataSource = GetData(100, 200, 40, 100);
    template4.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    template3.Templates.Add(template4);

    GridViewRelation relation4 = new GridViewRelation(template3);
    relation4.ChildTemplate = template4;
    relation4.RelationName = "ParentChild";
    relation4.ParentColumnNames.Add("Id");
    relation4.ChildColumnNames.Add("ParentId");
    radGridView1.Relations.Add(relation4);
}

private object GetData(int from, int to, int parentFrom, int parentTo)
{
    DataTable dt = new DataTable();
    dt.Columns.Add("Id", typeof(int));
    dt.Columns.Add("Name", typeof(string));  
    dt.Columns.Add("ParentId", typeof(int));
    Random rand = new Random();
    for (int i = from; i < to; i++)
    {
        dt.Rows.Add(i, "Child" + i, rand.Next(parentFrom, parentTo));
    }
    return dt;
}

private void radButton1_Click(object sender, EventArgs e)
{
    string s = "default.xml";
    SaveFileDialog dialog = new SaveFileDialog();
    dialog.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
    dialog.Title = "Select a xml file";
    if (dialog.ShowDialog() == DialogResult.OK)
    {
        s = dialog.FileName;
    }
    this.radGridView1.SaveLayout(s);
}

private void radButton2_Click(object sender, EventArgs e)
{
    string s = "default.xml";
    OpenFileDialog dialog = new OpenFileDialog();
    dialog.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
    dialog.Title = "Select a xml file";
    if (dialog.ShowDialog() == DialogResult.OK)
    {
        s = dialog.FileName;
    }
    this.radGridView1.LoadLayout(s);
}


Workaround: grid templates for the inner levels are recreated after loading the layout. Their DataSource is null and the existing relations points to the old templates. Clear the relations and setup them again with the new  child template instances.
Unplanned
Last Updated: 19 Mar 2019 07:32 by ADMIN

To reproduce: 

- Add items with the same display member open the drop-down and select the second.

- Select another control on the form and then reopen the popup.

- The first item is selected.

Workaround: 

class MyMultiColumnComboBox : RadMultiColumnComboBox
{
    protected override void OnLostFocus(EventArgs e)
    {
        if (this.DropDownStyle == Telerik.WinControls.RadDropDownStyle.DropDownList)
        {
            return;
        }
        base.OnLostFocus(e);
    }
}

Unplanned
Last Updated: 26 Feb 2019 21:09 by Bryan Cho
Changing the DataSource or scrolling are slow.

Create a grid with more than 20 columns and add 5K rows for example. Maximize the form and try to scroll with mouse wheel. You will notice that the scrolling performance is worse compared to the normal state of the form with less visible visual elements.

Workaround: this.radGridView1.EnableFastScrolling = true; and use the scrollbar's thumb

Second workaround: use paging:  https://docs.telerik.com/devtools/winforms/gridview/paging/overview Thus, you will display as many rows as possible to display on the screen per page. Instead of scrolling, you will navigate through pages.
Unplanned
Last Updated: 21 Feb 2019 08:27 by ADMIN
To reproduce:
- Filter a self-referencing grouped grid. 

Workaround:
private void _rgvFreeCodeValues_FilterChanged(object sender, GridViewCollectionChangedEventArgs e)
{
    foreach (var row in RgvFreeCodeValues.Rows)
        row.IsExpanded = false;
}

private void _rgvFreeCodeValues_FilterChanging(object sender, GridViewCollectionChangingEventArgs e)
{
    foreach (var row in RgvFreeCodeValues.Rows)
        row.IsExpanded = true;
}
Unplanned
Last Updated: 06 Nov 2018 09:14 by ADMIN
ADMIN
Created by: Dimitar
Comments: 0
Category: GridView
Type: Feature Request
0
This can be used for large amounts of data.

Check this - https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfstreamwriter/pdfstreamwriter
Unplanned
Last Updated: 15 Oct 2018 10:53 by ADMIN
To reproduce: run the attached sample project and activate the editor for the cell. You will notice that the row's height is now adjusted and single line text is displayed. It seems that the issue occurs because of the set Font property of the grid.

Workaround:  
        private void RadGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
        {
            e.Row.MinHeight = e.Row.Height + 3;
            RadTextBoxEditor tbEditor = e.ActiveEditor as RadTextBoxEditor;
            if (tbEditor != null)
            {
                tbEditor.Multiline = true;
            }
        }

        private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            e.Row.MinHeight = 0; 
        }
Unplanned
Last Updated: 15 Oct 2018 10:35 by ADMIN
A possible workaround is to use the following KB and change how it is implemented to iterate the MasterTemplate.Rows collection instead of the ViewInfo.Rows collection

https://www.telerik.com/support/kb/winforms/gridview/details/add-check-all-in-the-header-cell-for-a-gridviewcheckboxcolumn
Unplanned
Last Updated: 21 Sep 2018 08:40 by ADMIN
After populating the RadGridView, unbound in this example, I use RadGridView1.ClearSelection. This works when using some themes such as Crystal and Office2013, but not others, like Fluent. See attached..... believe me that the code is EXACTLY the same for each, just the application theme is difference. This should be an easy one to replicate.
Unplanned
Last Updated: 06 Jul 2018 12:54 by Baracskai
Created by: Baracskai
Comments: 0
Category: GridView
Type: Feature Request
1
Hello,

Please create a GridViewDateTimeOffsetColumn to support DateTimeOffset type.
A datetimeoffset editor would be good and support of nullable date types.

Thank you!
Unplanned
Last Updated: 04 Jul 2018 11:38 by ADMIN
To reproduce: please refer to the attached sample project and gif file.

Workaround: add the column programmatically, not at design time.
Unplanned
Last Updated: 02 Jul 2018 15:09 by Dimitar
Unplanned
Last Updated: 26 Jun 2018 10:00 by ADMIN
To reproduce:
- Create a self reference grid and set the columns width so the horizontal scrollbar is visible. 
- Scroll to the right and filter by the last column,
- Type a single character, the the edited cell is now changed. 

Workaround:
class MyFilterCell : GridFilterCellElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridFilterCellElement);
        }
    }

    public MyFilterCell(GridViewDataColumn column, GridRowElement row) : base(column, row)
    {
        
    }
    public override bool IsCompatible(GridViewColumn data, object context)
    {
        return false;
    }
}

Unplanned
Last Updated: 26 Jun 2018 09:36 by ADMIN
Use attached to reproduce.


Workaround: 

this.LoadFieldList(hiddenGrid.MasterTemplate);
this.FieldList.Add(new Telerik.Data.Expressions.ExpressionItem()
{ Name = "Test", Description = "Test", Syntax = "Test", Type = Telerik.Data.Expressions.ExpressionItemType.Field, Value = "Test" });