Approved
Last Updated: 12 Jun 2019 08:31 by ADMIN
Completed
Last Updated: 06 Jun 2019 13:44 by ADMIN
Release R2 2019 SP1 (LIB 2019.2.610)
Created by: Comparto
Comments: 1
Category: GridView
Type: Feature Request
1
Add deferred search like in WPF suite
Completed
Last Updated: 06 Jun 2019 13:28 by ADMIN
Release R2 2019 SP1 (LIB 2019.2.610)
Created by: James
Comments: 1
Category: GridView
Type: Bug Report
1

To reproduce:

- Set the AutoSize to true

- Add GroupDescriptor

- An InvalidOperationException is thrown

Completed
Last Updated: 06 Jun 2019 13:25 by ADMIN
Release R2 2019 SP1 (LIB 2019.2.610)
To reproduce:

Sub New()
     
    InitializeComponent()

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

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

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

    Next

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

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

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

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

    AddHandler Me.RadGridView1.ChildViewExpanding, AddressOf ChildViewExpanding
End Sub

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

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

Workaround:

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

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

End Sub

Dim lastClicked As GridViewRowInfo

Private Sub RadGridView_MouseDown(sender As Object, e As MouseEventArgs)
    Dim expander As GridExpanderItem = TryCast(Me.RadGridView1.ElementTree.GetElementAtPoint(e.Location), GridExpanderItem)
    If expander IsNot Nothing Then
        lastClicked = DirectCast(expander.Parent, GridGroupExpanderCellElement).RowInfo 
    End If 
End Sub
Approved
Last Updated: 06 Jun 2019 11:21 by ADMIN
Created by: Radu
Comments: 1
Category: GridView
Type: Bug Report
0

GridView is not correctly drawn if it's not populated and the theme is set to "TelerikMetro" or "TelerikMetroBlue" (the bottom line is missing). 

Steps to reproduce the behavior: create a RadForm, add a RadGridView to it and set the theme to "TelerikMetro" or "TelerikMetroBlue" by using ThemeResolutionService.ApplicationThemeName.

Declined
Last Updated: 05 Jun 2019 12:21 by ADMIN
Approved
Last Updated: 04 Jun 2019 08:17 by Sasa
Created by: Sasa
Comments: 2
Category: GridView
Type: Bug Report
1
RadGridView data source contains date values from years 2018 and 2019. After adding Excel like filters to the RadGridView and selecting year 2019 no rows were displayed, even though some values did match the filter condition (see attachment).
Approved
Last Updated: 24 May 2019 04:56 by ADMIN
The decimal separator is removed when exporting with German culture on Windows Server 2012
Completed
Last Updated: 16 May 2019 08:57 by ADMIN
Release R1 2019
ADMIN
Created by: Dimitar
Comments: 0
Category: GridView
Type: Bug Report
1
To reproduce:
- Add a checkbox column and hide some of the cells.
- Change some values and then click on empty cell.
- Exception occurs in OnMouseDownLeft method (GridRowBeahvior class)

Workaround:

Hide the checkbox only.
Completed
Last Updated: 16 May 2019 08:56 by ADMIN
Release R1 2019
To reproduce:
1. Add a RadMultiColumnComboBox and populate it with data.
2. Set the DropDownStyle property of the control to DropDownList
3. Set the EditorControl.AllowSearchRow and the AutoSizeDropDownToBestFit properties to true .
4. When you open the drop down and try to use the search row (e.g. clicking over the arrow buttons), the drop down is closed.

Workaround: 
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();

        this.radMultiColumnComboBox1.EditorControl.AllowSearchRow = true;
        this.radMultiColumnComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
        this.radMultiColumnComboBox1.DropDownClosing += RadMultiColumnComboBox1_DropDownClosing;
    }

    private void RadMultiColumnComboBox1_DropDownClosing(object sender, RadPopupClosingEventArgs args)
    {
        Point position = this.radMultiColumnComboBox1.EditorControl.PointToClient(Cursor.Position);

        Telerik.WinControls.RadElement searchElement = this.radMultiColumnComboBox1.EditorControl.ElementTree.GetElementAtPoint(position);
        if (searchElement != null)
        {
            GridSearchCellElement parent = searchElement.FindAncestor<GridSearchCellElement>();
            if (parent != null)
            {
                args.Cancel = true;
            }
        }
    }
}
Declined
Last Updated: 16 May 2019 08:17 by ADMIN
1. Create a new project and setup hierarchy
2. Add a large number of rows as child rows to the last row at first level
3. Run the project and try to expand the last row
Declined
Last Updated: 16 May 2019 08:10 by ADMIN
- Create a new project containing RadGridView
- Build hierarchy with large text data in cells
- Set the AutoSizeRows property to true and AutoSizeColumnMode to Fill
- Run the project, scroll down and try to click on a cell
Completed
Last Updated: 16 May 2019 05:57 by ADMIN
Created by: Pieter
Comments: 1
Category: GridView
Type: Bug Report
0

Steps to reproduce:

  • Create a RadGridView
  • DataBind the grid to a DataView (it might also fail for other kinds of databinding or content)
  • For a column, call BestFit().
  • Remove that column from the grid.
  • Add the Grid to a parent form or control 
  • Make the form/control visible.

When the grid is loaded and displayed, a NullReferenceException will be thrown:


Message             : Object reference not set to an instance of an object.
Type                : System.NullReferenceException
Source              : Telerik.WinControls.GridView
Stack trace         : Telerik.WinControls.UI.BestFitHelper.SetColumnWidth(GridViewColumn column, Single desiredWidth)
                      Telerik.WinControls.UI.BestFitHelper.BestFitColumnCore(GridViewColumn column, BestFitColumnMode mode)
                      Telerik.WinControls.UI.BestFitHelper.ProcessRequests()
                      Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize)
                      Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
                      Telerik.WinControls.RadElement.Measure(SizeF availableSize)
                      Telerik.WinControls.UI.ScrollViewElement`1.MeasureViewElement(SizeF availableSize)
                      Telerik.WinControls.UI.ScrollViewElement`1.MeasureView(SizeF availableSize)
                      Telerik.WinControls.UI.ScrollViewElement`1.MeasureOverride(SizeF availableSize)
                      Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize)
                      Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
                      Telerik.WinControls.RadElement.Measure(SizeF availableSize)
                      Telerik.WinControls.Layouts.DockLayoutPanel.MeasureOverride(SizeF constraint)
                      Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
                      Telerik.WinControls.RadElement.Measure(SizeF availableSize)
                      Telerik.WinControls.UI.LightVisualElement.MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
                      Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
                      Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
                      Telerik.WinControls.RadElement.Measure(SizeF availableSize)
                      Telerik.WinControls.RootRadElement.MeasureOverride(SizeF availableSize)
                      Telerik.WinControls.RootRadElement.MeasureCore(SizeF availableSize)
                      Telerik.WinControls.RadElement.Measure(SizeF availableSize)
                      Telerik.WinControls.RadElementTree.PerformInnerLayout(Boolean performMeasure, Int32 x, Int32 y, Int32 width, Int32 height)
                      Telerik.WinControls.RadControl.OnLoad(Size desiredSize)
                      Telerik.WinControls.UI.RadGridView.OnLoad(Size desiredSize)
                      Telerik.WinControls.RadControl.LoadElementTree(Size desiredSize)
                      Telerik.WinControls.RadControl.OnCreateControl()
                      System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
                      System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
                      System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
                      System.Windows.Forms.Control.CreateControl()
                      System.Windows.Forms.Control.SetVisibleCore(Boolean value)
                      Telerik.WinControls.UI.TabPanel.set_Visible(Boolean value)
                      Telerik.WinControls.UI.TabStripPanel.SetSelected(TabPanel tabPanel)
                      Telerik.WinControls.UI.TabStripPanel.UpdateTabSelection(Boolean updateFocus)
                      Telerik.WinControls.UI.Docking.DockTabStrip.UpdateTabSelection(Boolean updateFocus)
                      Telerik.WinControls.UI.Docking.ToolTabStrip.UpdateTabSelection(Boolean updateFocus)
                      Telerik.WinControls.UI.TabStripPanel.OnHandleCreated(EventArgs e)
                      System.Windows.Forms.Control.WmCreate(Message& m)
                      System.Windows.Forms.Control.WndProc(Message& m)
                      System.Windows.Forms.ScrollableControl.WndProc(Message& m)
                      Telerik.WinControls.RadControl.WndProc(Message& m)
                      Telerik.WinControls.UI.SplitPanel.WndProc(Message& m)
                      System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
                      System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
                      System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Approved
Last Updated: 16 May 2019 05:56 by ADMIN
Created by: Shawn
Comments: 2
Category: GridView
Type: Feature Request
0

I have the following logic for my View, which has a RadGridView control (add to form at design-time).

GUI is a lightweight view, Controller does the heavy lifting. That part is all good.

 

However setting the column name and column autosize stuff is a little more "over-complicated" than I'd wish to see. It all works though.

Would be nice to have a "GridViewTextBoxColumnAttribute" as per below, for properties on Custom datasource objects to achieve the same thing in a more concise way.

Or am I missing something and there is a much easier way to do what I want?

 

I have a number of datasource classes: MyObject, MyCar, MyDog, MyWhatever... that ALL have different property names and datatypes, but may or may-not have the same column name or MasterTemplate style.

 

Also BestFitColumns is a function of the MasterTemplate, would be nice if it were a property for consistency sake (call to internal function encapsulated in the Set etc), as from a Telerik user's perspective it's just an enum. Then it would be setable in the SmartTag window as well, as functions can't be assigned to.

 

  public partial class RadForm1 : Telerik.WinControls.UI.RadForm, IView
    {
        public RadForm1)
        {
            InitializeComponent();
        }

        private void RadForm1_Load(object sender, EventArgs e)
        {
            var x = new Controller();
            x.SetTemplate(this);           
        }

        public Telerik.WinControls.UI.RadGridView RadGridView()
        {
            return this.radGridView1;
        }
    }

    public class Controller
    {
        public void SetTemplate(IView view)
        {
            var View_RadGrid = view.RadGridView();
            View_RadGrid.MasterTemplate.AutoGenerateColumns = false;
            View_RadGrid.MasterTemplate.AutoGenerateHierarchy = false;
            View_RadGrid.MasterTemplate.AllowColumnResize = false;
            View_RadGrid.MasterTemplate.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.AllCells);

            var cols = new List<Telerik.WinControls.UI.GridViewDataColumn>()
            {
                new Telerik.WinControls.UI.GridViewTextBoxColumn("DisplayName1"),
                new Telerik.WinControls.UI.GridViewTextBoxColumn("DisplayName2")
            };
            View_RadGrid.MasterTemplate.Columns.AddRange(cols.ToArray());

            View_RadGrid.DataSource = new List<MyObject>() 
            { 
                new MyObject() { DisplayName1 = "1", DisplayName2 = "2" }, 
                new MyObject() { DisplayName1 = "3", DisplayName2 = "4" } 
            };
        }

        private class MyObject
        {
            [GridViewTextBoxColumnAttribute("DisplayName1", BestFitColumn = Telerik.WinControls.UI.BestFitColumnMode.AllCells, AllowColumnResize = false)]
            public string DisplayName1 { get; set; }

            [GridViewTextBoxColumnAttribute("DisplayName2", BestFitColumn = Telerik.WinControls.UI.BestFitColumnMode.AllCells, AllowColumnResize = false)]
            public string DisplayName2 { get; set; }
        }
    }

    public interface IView
    {
        Telerik.WinControls.UI.RadGridView RadGridView();
    }

    [System.AttributeUsage(System.AttributeTargets.Property)]
    public class GridViewTextBoxColumnAttribute : System.Attribute
    {
        private string FieldName;
        public Telerik.WinControls.UI.BestFitColumnMode BestFitColumn;
        public bool AllowColumnResize;

        public GridViewTextBoxColumnAttribute(string fieldName)
        {
            this.FieldName = fieldName;
        }
    }

Approved
Last Updated: 16 May 2019 05:17 by ADMIN
To reproduce: please run the attached sample project and follow the steps illustrated in the attached gif file:

Scrolling to a newly added row does not work when inner templates are visible.

Add data to the inner templates of several rows near the bottom using the button.
Expand these inner templates so they are all visible.
Scroll back up to the top.
Add a new item to the outer grid normally.
The table will jump to where it things the new item is but will fall short, instead scrolling to a location in one of the inner templates.
Workaround:

        private void RadGridView1_UserAddedRow(object sender, GridViewRowEventArgs e)
        {
            foreach (GridViewRowInfo    row in this.radGridView1.Rows)
            {
                if (row.IsExpanded)
                {
                    row.IsExpanded = false;
                    row.IsExpanded = true;
                }
            }
        }
Approved
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();
        }
    }
}
Approved
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;
            }
        }
Approved
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.


Approved
Last Updated: 14 May 2019 06:18 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
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;
    }
}
Approved
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?

1 2 3 4 5 6