Unplanned
Last Updated: 05 Nov 2019 08:17 by ADMIN

It seems that the GridViewColumnGroup.MinHeight has a big influence on the height of the filter cell.

Workaround:

this.radGridView1.AutoSizeRows = true;

Completed
Last Updated: 18 Oct 2019 08:03 by ADMIN
Release R3 2019 SP1
This way the column could bind to any collection of objects which can be converted to doubles.
Completed
Last Updated: 17 Oct 2019 09:43 by ADMIN
RadGridView can not change the current column (by using the IsCurrent of the desired column) in the CurrentColumnChanged event.
Completed
Last Updated: 14 Oct 2019 10:43 by ADMIN
Release R3 2019 SP1
Add a combo-box column that point to a field with Guid data type, add summary item to this columns as well.

Workaround: 

private void RadGridView1_CreateRowInfo(object sender, GridViewCreateRowInfoEventArgs e)
{
    if (e.RowInfo is GridViewSearchRowInfo)
    {
        e.RowInfo = new MySerachRow(e.ViewInfo);
    }

}
class MySerachRow : GridViewSearchRowInfo
{
    public MySerachRow(GridViewInfo viewInfo) : base(viewInfo)
    {
    }

    public override string GetCellFormattedValue(GridViewRowInfo row, GridViewColumn column)
    {
        if (row is GridViewSummaryRowInfo)
        {
            return "";
        }
        return base.GetCellFormattedValue(row, column);
    }
}
 
Completed
Last Updated: 14 Oct 2019 10:33 by ADMIN
Release R3 2019 SP1

Dear Telerik Support Team,

 

I have a Grid with one level of Hierarchy, I am using also the search row control of Gridview but this control only searches the data in the Parent Grid and not in the child Grid, I am using the version: v.2019.2.618.20 of Telerik controls in the Project. Below is the code snippet which is used in the Project, please let us know how we can search in child grid using the search row of the Gridview.

 

            radgvStockCount.DataSource = dtStockCountHeader
            radgvStockCount.MasterTemplate.EnableHierarchyFiltering = True
            radgvStockCount.UseScrollbarsInHierarchy = True
            radgvStockCount.MasterTemplate.Columns("INVCountHeaderId").IsVisible = False
            radgvStockCount.MasterTemplate.Columns("INVCountNo").HeaderText = "Stock Count No"
            radgvStockCount.MasterTemplate.Columns("CountryCode").HeaderText = "Country Code"
            radgvStockCount.MasterTemplate.Columns("AreaCode").HeaderText = "Area Code"
            radgvStockCount.MasterTemplate.Columns("LocationCode").HeaderText = "Location Code"
            radgvStockCount.MasterTemplate.Columns("LocationName").HeaderText = "Location Name"
            radgvStockCount.MasterTemplate.Columns("CreatedBy").HeaderText = "Opened By"
            radgvStockCount.MasterTemplate.Columns("CreatedDate").HeaderText = "Opened Date"

            Dim template As New GridViewTemplate()
            template.DataSource = dtStockCountBatches
            radgvStockCount.Templates.Add(template)
            template.Columns("INVCountBatchesId").IsVisible = False
            template.Columns("INVCountHeaderId").IsVisible = False
            template.Columns("INVCountNo").HeaderText = "Stock Count No"
            template.Columns("INVCountBatchesNo").HeaderText = "Stock Count Batch No"
            template.Columns("LocationCode").HeaderText = "Location Code"
            template.Columns("LocationName").HeaderText = "Location Name"
            template.Columns("SupervisorQty").HeaderText = "Supervisor Qty"
            template.Columns("CreatedBy").HeaderText = "Batch File Uploaded By"
            template.Columns("CreatedDate").HeaderText = "Uploaded Date"
            template.AllowAddNewRow = False
            template.AllowEditRow = False
            template.AllowDeleteRow = False
            template.AllowSearchRow = False
            template.AllowRowResize = False
            template.EnableFiltering = True
            template.EnableHierarchyFiltering = True
            template.ShowHeaderCellButtons = True
            template.ShowGroupedColumns = True
            template.EnableHierarchyFiltering = True
            template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill

            Dim relation As New GridViewRelation(radgvStockCount.MasterTemplate, template)
            relation.RelationName = "StockCountBatches"
            relation.ParentColumnNames.Add("INVCountHeaderId")
            relation.ChildColumnNames.Add("INVCountHeaderId")
            radgvStockCount.Relations.Add(relation)
Unplanned
Last Updated: 14 Oct 2019 06:06 by ADMIN

Please refer to the following code snippet demonstrating how the comparer can be applied:

        public RadForm1()
        {
            InitializeComponent();
            this.radGridView1.EnableFiltering = true;
            this.radGridView1.ShowHeaderCellButtons = true;
            this.radGridView1.FilterPopupInitialized += radGridView1_FilterPopupInitialized; 
        }

        private void radGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e)
        {
            RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
            if (popup != null)
            { 
                popup.MenuTreeElement.TreeView.TreeViewElement.Comparer = new MyComparer(popup.MenuTreeElement.TreeView.TreeViewElement);
            }
        }

        class MyComparer : TreeNodeComparer
        {
            public MyComparer(RadTreeViewElement treeView)
                : base(treeView)
            {
            }
            public override int Compare(RadTreeNode x, RadTreeNode y)
            {
                if (this.TreeViewElement.SortOrder == SortOrder.Descending)
                {
                    return x.Text.CompareTo(y.Text);
                }
                return x.Text.CompareTo(y.Text) * -1;
            }
        }

Completed
Last Updated: 08 Oct 2019 16:27 by ADMIN
Release R3 2019 SP1

When pressing Enter or Tab in the new row the ParsingDateTime event is fired after the editor is validated. Use attached to reproduce.

 

private void GridView_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    var editor = gridView.ActiveEditor as RadDateTimeEditor;
    var editorElement = editor.EditorElement as RadDateTimeEditorElement;
    editorElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;
    var provider = ((FreeFormDateTimeProvider)editorElement.TextBoxElement.Provider);
    editorElement.TextBoxElement.Provider = new MyFreeFormDateTimeProvider(provider.Mask, provider.Culture, provider.Owner);
}

class MyFreeFormDateTimeProvider : FreeFormDateTimeProvider
{
    public MyFreeFormDateTimeProvider(string mask, CultureInfo culture, RadMaskedEditBoxElement owner) : base(mask, culture, owner)
    {
    }
    public override bool Validate(string stringValue)
    {
        //do your code here
        return base.Validate(stringValue);
    }
}
Completed
Last Updated: 08 Oct 2019 16:26 by ADMIN
Release R3 2019 SP1
Completed
Last Updated: 08 Oct 2019 16:24 by ADMIN
Release R3 2019 SP1
The BackColor is not exported when a custom theme is used along with conditional formatting and BackColor is set to transparent in the custo theme.
Completed
Last Updated: 08 Oct 2019 16:13 by ADMIN
Release R3 2019 SP1
Created by: Dimitar
Comments: 0
Category: GridView
Type: Bug Report
0
The DateTime Value is lost when using a custom format "dd.MM.yyyy" in RadgridView and custom provider is used. 

Workaround: 
Set the MaxDate in the custom provider:
Public Class MyMaskDateTimeProvider
  Inherits MaskDateTimeProvider

  Public Sub New(mask As String, culture As CultureInfo, owner As RadMaskedEditBoxElement)
        MyBase.New(mask, culture, owner)
        Me.MaxDate = DateTime.MaxValue
    End Sub

   
End Class
Unplanned
Last Updated: 08 Oct 2019 12:15 by ADMIN
Completed
Last Updated: 08 Oct 2019 11:19 by ADMIN
Release R3 2019 SP1
Created by: Syed Hussain
Comments: 5
Category: GridView
Type: Bug Report
0

We have upgraded from WinControl UI 2010 to 2019 R2. 

we have a lot of non-data bound radgridview that we process our data and add each row manually.

The radgridView.Rows.Add(rowdatacolumn1, rowdatacolumn2, rowdatacolumn3) used to return the row index of the added row. It is now returning -1 . 

This is breaking a lot of our code. 

Unplanned
Last Updated: 04 Oct 2019 10:04 by ADMIN

I am currently working in Telerik v2019.3.917 and .Net 4.5.2. I have multiple theme's setup for a local application for my users but I am seeing something odd with the Telerik.WinControls.Themes.HighContrastBlack theme. It appears that I am unable to select more than one cell in this theme. My grid has multiselect as true and SelectionMode as CellSelect. I have tried holding ctrl and clicking cells, clicking the row header, holding the mouse down and dragging, and using Ctrl+A but none of these select more than one cell.

I am setting the application theme on launch:

var _t = new Telerik.WinControls.Themes.HighContrastBlackTheme();
ThemeResolutionService.ApplicationThemeName = "HighContrastBlack";

 

Themes that work: All Fluents, All Material, All VS.

Is this a bug or am I missing something?

Declined
Last Updated: 27 Sep 2019 10:43 by ADMIN
ADMIN
Created by: Telerik Admin
Comments: 5
Category: GridView
Type: Bug Report
1
Hi,

Following to the workaroud (flag IsSearchAsync) provided (https://feedback.telerik.com/Project/154/Feedback/Details/245938-fix-radgridview-having-groups-filters-sort-descriptors-and-search-query-in-t), we discovered two issues :

1) the behavior of the grid is changed while using IsSearchAsync as true or false (see 2018-08-01_1849_DragDrop_behavior_with_IsSearchAsync.swf video attached). When set to true, the line found by the searchbox is automatically reselected. When the flag is set to false, it's not the case.

2) while playing with drag&drop, after some time the grid became unstable (see 2018-08-01_1847_-_dragdrop_issue_with_IsAsyncSearch.swf video attached). You can see that at the beginning, the D&D works fine. At 0:20 I can't select any line, and when I try to D&D, it drops always the same customer. At 0:40 you can see that even the SearchBox is broken and the progressbar is looping forever
Unplanned
Last Updated: 27 Sep 2019 10:18 by ADMIN
Use attached to reproduce.

Workaround:
Set the TableHeaderHeight again after loading the layout. 
Declined
Last Updated: 13 Sep 2019 07:11 by ADMIN
To reproduce: please refer to the attached sample project and gif file

Workaround:

            GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
            spreadExporter.ExportFormat = SpreadExportFormat.Pdf;
            spreadExporter.ExportVisualSettings = true;
            SpreadExportRenderer exportRenderer = new SpreadExportRenderer();
            spreadExporter.RunExport(exportFile, exportRenderer);
            Process.Start(exportFile);
Completed
Last Updated: 22 Aug 2019 13:22 by ADMIN
To reproduce: run the attached project and toggle the checkbox in the header cell of the child template. 

Workaround: use a custom GridCheckBoxHeaderCellElement


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

            this.radGridView1.CreateCell += radGridView1_CreateCell;

            DataTable dt = new DataTable();
            dt.Columns.Add("CategoryId", typeof(int));
            dt.Columns.Add("CategoryName", typeof(string));
            dt.Columns.Add("ParentCategoryId", typeof(int));

            dt.Rows.Add(1, "Category1", 0);
            dt.Rows.Add(2, "Category2", 0);
            dt.Rows.Add(3, "Category3", 0);

            Random rand = new Random();
            for (int i = 4; i < 20; i++)
            {
                dt.Rows.Add(i, "Category" + i, rand.Next(1, 4));
            }
            this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "CategoryId", "ParentCategoryId");
            this.radGridView1.DataSource = dt;
            this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

            GridViewTemplate childTemplate = CreateChildTemplate();
            GridViewRelation relation = new GridViewRelation(
                this.radGridView1.MasterTemplate,
                childTemplate);
            relation.ChildColumnNames.Add("CategoryId");
            relation.ParentColumnNames.Add("CategoryId");
            this.radGridView1.Relations.Add(relation);
        }

        private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
        {
            if (e.CellType == typeof(GridCheckBoxHeaderCellElement))
            {
                e.CellElement = new CustomGridCheckBoxHeaderCellElement(e.Column, e.Row);
            }
        }

        private GridViewTemplate CreateChildTemplate()
        {
            GridViewTemplate childTemplate = new GridViewTemplate();
            childTemplate.AutoGenerateColumns = false;
            this.radGridView1.Templates.Add(childTemplate);

            GridViewDecimalColumn decColumn = new GridViewDecimalColumn
            {
                Name = "CategoryId",
                HeaderText = "CategoryId Id",
                FieldName = "CategoryId",
                IsVisible = false,
                MinWidth = 100
            };
            childTemplate.Columns.Add(decColumn);

            GridViewTextBoxColumn tbxColumn = new GridViewTextBoxColumn
            {
                Name = "RightName",
                HeaderText = "Right Name",
                FieldName = "RGT_NAME",
                ReadOnly = true,
                MinWidth = 100
            };
            childTemplate.Columns.Add(tbxColumn);

            GridViewCheckBoxColumn chkxColumn = new GridViewCheckBoxColumn
            {
                Name = "Checkbox",
                EnableHeaderCheckBox = true,
                FieldName = "HasAccess",
            };
            childTemplate.Columns.Add(chkxColumn);
            childTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            return childTemplate;
        }

        public class CustomGridCheckBoxHeaderCellElement : GridCheckBoxHeaderCellElement
        {
            public CustomGridCheckBoxHeaderCellElement(GridViewColumn column, GridRowElement row) : base(column, row)
            {
            }

            public bool SuspendProcessingToggleStateChanged
            {
                get
                {
                    FieldInfo fi = typeof(GridCheckBoxHeaderCellElement).GetField("suspendProcessingToggleStateChanged", BindingFlags.NonPublic | BindingFlags.Instance);
                    return (bool)fi.GetValue(this);
                }
                set
                {
                    FieldInfo fi = typeof(GridCheckBoxHeaderCellElement).GetField("suspendProcessingToggleStateChanged", BindingFlags.NonPublic | BindingFlags.Instance);
                    fi.SetValue(this, value);
                }
            }

            public bool ShouldCheckDataRows
            {
                get
                {
                    FieldInfo fi = typeof(GridCheckBoxHeaderCellElement).GetField("shouldCheckDataRows", BindingFlags.NonPublic | BindingFlags.Instance);
                    return (bool)fi.GetValue(this);
                }
                set
                {
                    FieldInfo fi = typeof(GridCheckBoxHeaderCellElement).GetField("shouldCheckDataRows", BindingFlags.NonPublic | BindingFlags.Instance);
                    fi.SetValue(this, value);
                }
            }

            protected override void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args)
            {
                if (SuspendProcessingToggleStateChanged)
                {
                    return;
                }

                if (this.ViewTemplate != null && !this.ViewTemplate.IsSelfReference && !this.MasterTemplate.IsSelfReference)
                {
                    this.MasterTemplate.BeginUpdate();
                }
                else
                {
                    this.TableElement.BeginUpdate();
                }

                object valueState = DBNull.Value;

                if (args.ToggleState == ToggleState.On)
                {
                    valueState = true;
                }
                else if (args.ToggleState == ToggleState.Off)
                {
                    valueState = false;
                }
                else if (args.ToggleState == ToggleState.Indeterminate)
                {
                    valueState = null;
                }

                RaiseToggleStateEvent();

                if (!ShouldCheckDataRows)
                {
                    if (this.ViewTemplate != null && !this.ViewTemplate.IsSelfReference && !this.MasterTemplate.IsSelfReference)
                    {
                        this.MasterTemplate.EndUpdate(true, new DataViewChangedEventArgs(ViewChangedAction.DataChanged));
                    }

                    return;
                }

                this.GridViewElement.EditorManager.EndEdit();

                this.TableElement.BeginUpdate();
                this.MasterTemplate.MasterViewInfo.TableSearchRow.SuspendSearch();
                List<GridViewRowInfo> list = GetRowsToIterateOver();
                foreach (GridViewRowInfo rowInfo in list)
                {
                    GridViewGroupRowInfo groupRow = rowInfo as GridViewGroupRowInfo;

                    if (groupRow != null)
                    {
                        this.CheckAllCheckBoxInChildRows(groupRow, valueState);
                    }
                    else
                    {
                        rowInfo.Cells[this.ColumnIndex].Value = valueState;
                    }
                }
                this.MasterTemplate.MasterViewInfo.TableSearchRow.ResumeSearch();
                this.TableElement.EndUpdate(false);

                if (this.ViewTemplate != null && !this.ViewTemplate.IsSelfReference && !this.MasterTemplate.IsSelfReference)
                {
                    this.MasterTemplate.EndUpdate(true, new DataViewChangedEventArgs(ViewChangedAction.DataChanged));
                }
                else
                {
                    this.TableElement.EndUpdate(false);
                }

                this.TableElement.Update(GridUINotifyAction.DataChanged);
            }

            private void CheckAllCheckBoxInChildRows(GridViewGroupRowInfo row, object state)
            {
                List<GridViewRowInfo> list = new List<GridViewRowInfo>();

                foreach (GridViewRowInfo rowInfo in row.ChildRows)
                {
                    list.Add(rowInfo);
                }

                foreach (GridViewRowInfo rowInfo in list)
                {
                    GridViewGroupRowInfo groupInfo = rowInfo as GridViewGroupRowInfo;
                    if (groupInfo != null)
                    {
                        this.CheckAllCheckBoxInChildRows(groupInfo, state);
                    }
                    else
                    {
                        rowInfo.Cells[this.ColumnIndex].Value = state;
                    }
                }
            }

            private List<GridViewRowInfo> GetRowsToIterateOver()
            {
                if (this.ViewTemplate != null && this.ViewTemplate.IsSelfReference)
                {
                    PrintGridTraverser traverser = new PrintGridTraverser(this.ViewInfo);
                    List<GridViewRowInfo> result = new List<GridViewRowInfo>();

                    while (traverser.MoveNext())
                    {
                        if (traverser.Current is GridViewDataRowInfo)
                        {
                            result.Add(traverser.Current);
                        }
                    }

                    return result;
                }

                return new List<GridViewRowInfo>(this.ViewInfo.Rows);
            }
        }
    }
Unplanned
Last Updated: 18 Jul 2019 11:45 by ADMIN

Hello,

In our Environment it's not possible to assign a GroupComparer to another GridView template then MasterTemplate. The GroupComparer property is always null after assignment.

It's possible to assign our custom comparer to the MasterTemplate and it will be triggered, but not in another template then MasterTemplate.

Best regards.

Tassilo Koller | Dipl. Informatiker (FH) | IT-Softwareentwicklung

[T] +49 (0)8233 381 383

[E] Tassilo.Koller@forum-media.com | [W] www.forum-verlag.com

FORUM MEDIA GROUP GMBH| Mandichostraße 18 | 86504 Merching | [T] +49 (0)8233 381-0 | [F] + 49 (0)8233 381-222 | [W] www.forum-media.com| Sitz der Gesellschaft: Merching | Register: AG Augsburg HRB 11537 | Geschäftsführer: Magdalena Balanicka, Norbert Bietsch, Roland Hradek, Mihaela Mravlje | Beirat: Ronald Herkert (Vorsitzender)

Elektronische Rechnungen bitte an folgende Adresse senden: invoice@forum-media.com

Completed
Last Updated: 17 Jul 2019 07:33 by ADMIN
Release R3 2019 (LIB 2019.2.722)
Completed
Last Updated: 15 Jul 2019 08:33 by ADMIN
Release R3 2019 (LIB 2019.2.722)
Created by: Daniel
Comments: 1
Category: GridView
Type: Bug Report
6

Steps to reproduce:

  1. Click column header to sort.
  2. Click button which to export to Excel.
  3. The rows return to unsorted.
  4. Scroll down slightly and scroll back up and the sort is restored.

This happens after calling RunExport.

I attached a gif and a sample project.