Completed
Last Updated: 03 Feb 2022 08:02 by ADMIN
Release R1 2022 SP1
Workaround:
Call the EndPrint method after the printing.
this.radGridView1.Print(true, this.radPrintDocument1);
(this.radGridView1 as IPrintable).EndPrint(null, null);
Completed
Last Updated: 02 Feb 2022 16:50 by ADMIN
Release R1 2022 SP1

Please run the sample project and follow the steps:

1.Open the attached solution in Visual Studio - I am using VS 2022.
2.Select the Grid.
3.Edit the templates.
4.For gridViewTemplate1, set SelectNewRowasCurrent to false.
5.Close the editor.
6.Close the WinForms designer.
7.Open the WinForms designer again.
Completed
Last Updated: 26 Jan 2022 10:33 by ADMIN
Release R1 2022 SP1

Use this XML layout: 

 

this.radGridView1.LoadLayout(@"..\..\..\Layout.xml");

 

 

<RadGridView Padding="0, 0, 0, 1" Cursor="Default" TabIndex="49">
<MasterTemplate EnableGrouping = "True" AllowEditRow="False" AllowDeleteRow="False" AllowAddNewRow="False" EnableFiltering="True" AutoExpandGroups="True">
<Columns>
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="JobID" Name="JobID" IsAutoGenerated="True" IsVisible="True" HeaderText="JobID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="CustomerID" Name="CustomerID" IsAutoGenerated="True" IsVisible="True" HeaderText="CustomerID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="285" FieldName="StatusID" Name="StatusID" IsAutoGenerated="True" IsVisible="True" HeaderText="StatusID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="UnitID" Name="UnitID" IsAutoGenerated="True" IsVisible="True" HeaderText="UnitID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="OperatorID" Name="OperatorID" IsAutoGenerated="True" IsVisible="True" HeaderText="OperatorID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="JobTypeID" Name="JobTypeID" IsAutoGenerated="True" IsVisible="True" HeaderText="JobTypeID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="JobCatID" Name="JobCatID" IsAutoGenerated="True" IsVisible="True" HeaderText="JobCatID" />
<Telerik.WinControls.UI.GridViewDateTimeColumn Width="100" FieldName="StartTime" Name="StartTime" IsAutoGenerated="True" IsVisible="True" HeaderText="StartTime">
<FilterDescriptor xsi:type="Telerik.WinControls.Data.DateFilterDescriptor" Value="" IgnoreTimePart="False" PropertyName="StartTime" Operator="IsNotNull" IsFilterEditor="True" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</Telerik.WinControls.UI.GridViewDateTimeColumn>
<Telerik.WinControls.UI.GridViewDateTimeColumn Width="100" FieldName="FinishTime" Name="FinishTime" IsAutoGenerated="True" IsVisible="True" HeaderText="FinishTime" />
<Telerik.WinControls.UI.GridViewDateTimeColumn Width="100" FieldName="CreateDate" Name="CreateDate" SortOrder="Descending" IsAutoGenerated="True" IsVisible="True" HeaderText="CreateDate" />
<Telerik.WinControls.UI.GridViewDateTimeColumn Width="100" FieldName="StatusJobDate" Name="StatusJobDate" IsAutoGenerated="True" IsVisible="True" HeaderText="StatusJobDate" />
<Telerik.WinControls.UI.GridViewTextBoxColumn Width="100" FieldName="UserID" Name="UserID" IsAutoGenerated="True" IsVisible="True" HeaderText="UserID" />
<Telerik.WinControls.UI.GridViewTextBoxColumn DataType="System.Guid" Width="100" FieldName="TableKey" Name="TableKey" IsAutoGenerated="True" IsVisible="False" HeaderText="TableKey" />
</Columns>
<FilterDescriptors>
<Telerik.WinControls.Data.DateFilterDescriptor Value="" IgnoreTimePart="False" PropertyName="StartTime" Operator="IsNotNull" IsFilterEditor="True" />
</FilterDescriptors>
<SortDescriptors>
<Telerik.WinControls.Data.SortDescriptor PropertyName="CreateDate" Direction="Descending" />
</SortDescriptors>
<ViewDefinition xsi:type="Telerik.WinControls.UI.TableViewDefinition" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</MasterTemplate>
</RadGridView>

Workaround: 

public class CustomGridView : RadGridView
{
    protected override GridViewLayoutSerializer CreateGridViewLayoutSerializer(Telerik.WinControls.XmlSerialization.ComponentXmlSerializationInfo info)
    {
        return new CustomGridViewLayoutSerializer(info);
    }
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadGridView).FullName;
        }
    }
}

public class CustomGridViewLayoutSerializer : GridViewLayoutSerializer
{ 
    public CustomGridViewLayoutSerializer(ComponentXmlSerializationInfo componentSerializationInfo) : base(componentSerializationInfo)
    {
    }

    protected override bool ProcessReaderAttribute(System.Xml.XmlReader reader, object parentObject, object toRead, PropertyDescriptor property)
    {
        if (toRead is FilterDescriptor && reader.Value == string.Empty)
        {
            object val = reader.Value;
            if (property.ComponentType == typeof(DateFilterDescriptor))
            {
                val = null;
            }
            
            this.SetPropertyValue(property, toRead, val);
            return true;
        }

        return base.ProcessReaderAttribute(reader, parentObject, toRead, property);
    }
}

 

Completed
Last Updated: 26 Jan 2022 10:32 by ADMIN
Release R1 2022 SP1

Please refer to the sample project and open the Home form. The attached gif file illustrates how to reproduce the error.

Workaround: define the grid relations via code.

Unplanned
Last Updated: 25 Jan 2022 09:46 by ADMIN
The attached gif file illustrates the current behavior. Pressing Enter while editing the criteria nodes tries to submit the filter dialog even though the filter expression may not be valid.
Completed
Last Updated: 06 Jan 2022 16:09 by ADMIN
Release R1 2022
StackOverflow exception is thrown in Self-Referencing mode when deleting a child and its parent row
Declined
Last Updated: 04 Jan 2022 16:02 by ADMIN

To reproduce:

 

        public RadForm1()
        {
            InitializeComponent();

            string txt = "what follows is test characters (some of) which should cause error:  เปลี่ยน UPS ที่ห้อง Truck scale เนื่องจากเมื่อวันพฤหัสที่ 13 มีการออฟเบรกเกอร์ที่ ฺฺB/H แต่ว่า เครื่องคอมพิวเตอร์ที่ T/S ดับ ตัว UPS ไม่ทำงาน ทำให้ข้อมูลขณะนั้นหายไป   ";
            this.label1.Text = txt; // No error

            Font font = this.label1.Font;// new Font("Segoe UI", 9.5f, FontStyle.Regular);
            this.radLabel1.Font = font;
            this.radLabel1.Text = txt; //GDI error
        }

Workaround: 

this.radLabel1.UseCompatibleTextRendering = false;

Completed
Last Updated: 21 Dec 2021 15:45 by ADMIN
Release R1 2022
To reproduce :
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();
        radGridView1.DataSource = GetTable();
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        var exporter = new GridViewPdfExport(radGridView1);
        exporter.FileExtension = "pdf";
        exporter.ShowHeaderAndFooter = true;
        exporter.LeftFooter = GridViewPdfExport.DatePrintedString;
        exporter.FitToPageWidth = true;
        exporter.PageMargins = new Padding(20, 15, 10, 10);
        exporter.RunExport(@"C:\Users\dkaramfi\Desktop\test123.pdf", new PdfExportRenderer());

    }

    static DataTable GetTable()
    {

        DataTable table = new DataTable();
        table.Columns.Add("Dosage", typeof(int));
        table.Columns.Add("Drug", typeof(string));
        table.Columns.Add("Name", typeof(string));
        table.Columns.Add("Name1", typeof(string));
        table.Columns.Add("Name2", typeof(string));
        table.Columns.Add("Name3", typeof(string));
        table.Columns.Add("Name4", typeof(string));


        table.Rows.Add(50, "Enebrel", "Sam", "Sam1", "Sam2", "Sam4", "Sam4");
        table.Rows.Add(25, "Indocin", "David");
        table.Rows.Add(50, "Enebrel", "Sam");
        table.Rows.Add(10, "Hydralazine", "Christoff");
        table.Rows.Add(21, "Combivent", "Janet");
        table.Rows.Add(100, "Dilantin", "Melanie");
        return table;
    }
}

Workaround:
Leave the default margins.
Unplanned
Last Updated: 09 Dec 2021 14:57 by ADMIN

Use the following code snippet:

public RadForm1()
{
    InitializeComponent();

    GridViewDecimalColumn idColumn = new GridViewDecimalColumn("Id");
    this.radGridView1.Columns.Add(idColumn);
    GridViewTextBoxColumn nameColumn = new GridViewTextBoxColumn("Name");
    this.radGridView1.Columns.Add(nameColumn);
    GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn("Date");
    dateColumn.FilteringMode = GridViewTimeFilteringMode.Date;
    dateColumn.Format = DateTimePickerFormat.Custom;
    dateColumn.CustomFormat = "dd/MM/yyyy";
    dateColumn.FormatString = "{0:dd/MM/yyyy}";
    this.radGridView1.Columns.Add(dateColumn);
    this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

    for (int i = 0; i < 50; i++)
    {
        this.radGridView1.Rows.Add(i,"Row"+i,DateTime.Now.AddDays(i));
    }

    this.radGridView1.EnableFiltering = true;
    this.radGridView1.ShowHeaderCellButtons = true;
    this.radGridView1.ShowFilteringRow = false;

    this.radGridView1.FilterExpressionChanged += RadGridView1_FilterExpressionChanged;
}

private void RadGridView1_FilterExpressionChanged(object sender, FilterExpressionChangedEventArgs e)
{
    Console.WriteLine(e.FilterExpression);
}

 If I use the calendar control then the sequence works:

Click the filter button
Click Available filters
Click Equals
Click the calendar button in the value field
Click on December 10, 2021

But if I do not use the calendar control then it does not work. This sequence produces no results:

Click the filter button
Click Available filters
Click Equals
Click on the day component of the value field
Type in 10
Click OK

Workaround:

        private void RadGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e)
        {
            e.Dialog = new CustomCompositeDataFilterForm();
        }

        public class CustomCompositeDataFilterForm : CompositeDataFilterForm
        {
            protected override void OnClosing(CancelEventArgs e)
            {
                base.OnClosing(e);
                if (GridFilterCellElement.ValidateUserFilter(this.FilterDescriptor))
                {
                    CompositeFilterDescriptor cfd = this.FilterDescriptor as CompositeFilterDescriptor;
                    if (cfd != null)
                    {
                        foreach (FilterDescriptor fd in cfd.FilterDescriptors)
                        {
                            TrimTimePart(fd);
                        }
                    }
                    else
                    {
                        TrimTimePart(this.FilterDescriptor);
                    }
                   
                }
            }

            private void TrimTimePart(FilterDescriptor filterDescriptor)
            {
                CompositeFilterDescriptor cfd = filterDescriptor as CompositeFilterDescriptor;
                if (cfd != null)
                {
                    foreach (FilterDescriptor fd in cfd.FilterDescriptors)
                    {
                        TrimTimePart(fd);
                    }
                }
                else
                {
                    DateTime dateValue = DateTime.MinValue;
                    if (DateTime.TryParse(filterDescriptor.Value + "", out dateValue))
                    {
                        dateValue = dateValue.Date;
                       filterDescriptor.Value = dateValue;
                    }
                }
            }
        }

Declined
Last Updated: 19 Nov 2021 09:52 by ADMIN
Created by: dev
Comments: 4
Category: GridView
Type: Bug Report
1

Hi,

I have a question regarding RadGridView. When I edit a cell in GridView and then click on a button (outside of gridview) immediately (i.e I don't click on another cell to exit edit mode), the Gridview is still edit mode. Please refer to the short video named "Without Using EndEdit()" to easily understand my point here.

In order to exit the edit mode, I try the following code:

    Private Sub CustomGridView_LostFocus(sender As Object, e As EventArgs) Handles Me.LostFocus
        Me.EndEdit()
    End Sub

With this code, the gridview does exit the edit mode when I click on another button. But there is a problem with this method is that afterwards, I cannot edit the cell anymore.  Please refer to the short video named "Using EndEdit()" to better understand the problem.

So my question here is, is there any way that I can exit edit mode when clicking on another button right after editing a cell?

Thank you for your help.

Best regards,

Tran

 

 
Completed
Last Updated: 09 Nov 2021 10:13 by ADMIN
Release R3 2021 SP1

To reproduce, rebind the grid to a data table on button click and show grid's search row.

public RadForm1()
{
    InitializeComponent();
    this.radGridView1.AllowSearchRow = true;
}

private void RadButton1_Click()
{
    DataTable dt = this.GetData();
    this.radGridView1.DataSource = dt;
}
private DataTable GetData()
{
    DataTable data = new DataTable();
    for (int i = 0; i < 5; i++)
    {
        data.Columns.Add("Column " + i, typeof(int));
        data.Columns.Add("Column " + i + 1, typeof(string));
        data.Columns.Add("Column " + i + 2, typeof(string));
    }

    for (int k = 0; k < 5000; k++)
    {
        object[] parameters = new object[15];
        for (int i = 0; i < 15; i += 3)
        {
            parameters[i] = k;
            parameters[i + 1] = "Text " + i;
            parameters[i + 2] = "Text " + i + 1;
        }

        data.Rows.Add(parameters);
    }

    return data;
}

Unplanned
Last Updated: 28 Oct 2021 14:07 by Rune Toft

There are situations where SelectedRows won't return the number of rows preselected when using Begin/EndUpdate even though it seems like there's a row selected in the UI. By preselected I mean the row that looks selected after the rows has been added. This bug has caused some problems for us because the user tried some action on a row they thought was preselected and it would fail.

One situation I found where this bug can be reproducted is by using SortOrder in combination of Begin/EndUpdate. There are probably more situations but I hope this one will let you find the underlying bug.

The attached project contains a simple form with a RadGridView which will contain a list of persons. The list is populated by this method:

public void PopulateGridView(List<Person> persons)
{
	PersonGridView.BeginUpdate();
	PersonGridView.DataSource = persons;
	PersonGridView.EndUpdate();
	PersonGridView.Columns[nameof(Person.LastName)].SortOrder = RadSortOrder.Ascending;
}

There are two buttons: "Step one" and "Step two". The first will mimick a situation where the user search a database for persons and none will be found. By clicking the "Get selected rows" you will see that the SelectedRows will return zero rows which is correct.
But when you afterwards click "Step two" (which will add five rows) it seems like there's one row preselected. I would expect the SelectedRows to return that row but by clicking "Get selected rows" again you will see that the returned rows are zero still. The CurrentRow, however is set to the preselected row as expected.
If you start by clicking "Step two" the SelectedRows actually returns the correct rows. Quite strange :-)

I know this is a very small issue and can be avoided. But as I mentioned there are other situations where this problem occurs and it's quite hard to figure out exactly what causes it.

Thank you for your help.

Best regards
Ulrik Skovenborg

Completed
Last Updated: 08 Oct 2021 15:04 by ADMIN
Release R3 2021 SP1
Created by: Ben
Comments: 1
Category: GridView
Type: Bug Report
0

Hi There,

 

This call is only a nice to have, it is not critical at all. It is just a slight annoyance when building the Grid's columns - especially when there are many columns to adjust. My workflow is usually as follow. 

 

Add all the columns needed, then after that I will run through all the columns and want to set the widths. But my speed is broken because I can't tab between the 3 width properties: Width, Min Width, Max Width. I have to click to put focus the the next value.

 

If possible, please can you correct the tab indexes?

 

Thank you

Kind Regards

Ben

 

PS. You may close this ticket immediately - this is only a request.

Unplanned
Last Updated: 07 Oct 2021 10:12 by ADMIN
Created by: Ben
Comments: 0
Category: GridView
Type: Bug Report
1

Please run the attached sample project. The row's height in the print document is not adjusted according to the column's width in the print page. 

Workaround: 

Usually for such cases it is convenient to increase the column's width in order to reduce its height and thus it would be able to fit the print page's height. In addition to adjusting the column's width, feel free to use multi-page printing:

https://docs.telerik.com/devtools/winforms/controls/gridview/printing-support/gridprintstyle#multi-page-printing   

 

Declined
Last Updated: 06 Oct 2021 08:23 by ADMIN
To reproduce: please open the attached sample project and follow the steps illustrated in the attached gif file.

Workaround: 
1. You still can scroll while dragging a row by using the mouse wheel.

2. Use the grid in unbound mode and set the AllowRowReorder property to true instead of using a custom RadDragDropService.

3. Use a custom drag and drop service:

public class CustomDragDropService : RadGridViewDragDropService
{
    public CustomDragDropService(RadGridViewElement gridViewElement) : base(gridViewElement)
    {
    }

    public override string Name
    {
        get
        {
            return typeof(RadGridViewDragDropService).Name;
        }
    }

    protected override void HandleMouseMove(System.Drawing.Point mousePosition)
    {
        base.HandleMouseMove(mousePosition);
        System.Drawing.Point location = this.GridViewElement.ElementTree.Control.PointToClient(Control.MousePosition);
        GridTableElement tableElement = this.GetTableElementAtPoint(location);

        ISupportDrag supportDrag = this.Context as ISupportDrag;
        object dataContext = supportDrag.GetDataContext();

        if (this.AllowAutoScrollRowsWhileDragging && dataContext == null)
        {
            ScrollRows(tableElement, location);
        }
    }

    private void ScrollRows(GridTableElement tableElement, System.Drawing.Point location)
    {
        ScrollableRowsContainerElement scrollableRows = tableElement.ViewElement.ScrollableRows;
        RadScrollBarElement vScrollbar = GetVeritcalScrollbar(tableElement);
        System.Drawing.Rectangle containerBounds = scrollableRows.ControlBoundingRectangle;

        if (containerBounds.Contains(location) ||
            location.X < containerBounds.X ||
            location.X > containerBounds.Right)
        {
            return;
        }

        int delta = 0;

        if (location.Y > containerBounds.Bottom)
        {
            delta = location.Y - containerBounds.Bottom;
        }
        else if (location.Y < containerBounds.Y)
        {
            delta = location.Y - containerBounds.Y;
        }

        if (delta != 0 && vScrollbar.Visibility == ElementVisibility.Visible)
        {
            vScrollbar.Value = ClampValue(vScrollbar.Value + delta,
                vScrollbar.Minimum,
                vScrollbar.Maximum - vScrollbar.LargeChange + 1);
        }
    }

    private int ClampValue(int value, int minimum, int maximum)
    {
        if (value < minimum)
        {
            return minimum;
        }
        if (maximum > 0 && value > maximum)
        {
            return maximum;
        }
        return value;
    }

    private RadScrollBarElement GetVeritcalScrollbar(GridTableElement tableElement)
    {
        if (GridViewElement.UseScrollbarsInHierarchy)
        {
            return tableElement.VScrollBar;
        }
        return GridViewElement.TableElement.VScrollBar;
    }
}

public RadForm1()
{
    InitializeComponent();
    CustomDragDropService customService = new CustomDragDropService(radGridView1.GridViewElement);
    radGridView1.GridViewElement.RegisterService(customService);
}
Completed
Last Updated: 05 Aug 2021 14:10 by ADMIN
Release R3 2021
  1. Filter the column "code" to show only "(Blanks)"
  2. Hit the "Save Layout" button to save the layout into a string
  3. Hit the "Load Layout" button. The row is gone
 
Completed
Last Updated: 02 Aug 2021 08:33 by ADMIN
Release R3 2021 (LIB 2021_2_802)
We're trying to apply a filter to data that may contain infinity values but it is not working.
Completed
Last Updated: 22 Jun 2021 17:34 by ADMIN
Release R3 2021
I have a RadGridView that has expandable rows. If I expand the row, start editing an editable cell and then, without committing the edit (by pressing enter or clicking away from the cell), collapse the row, the program crashes with roughly the following stack trace:


Stack Trace:
   at System.Collections.ArrayList.BinarySearch(Int32 index, Int32 count, Object value, IComparer comparer)
   at Telerik.WinControls.UI.TextBoxWrapPanel.BinarySearch(LineInfo line, IComparer comparer)
   at Telerik.WinControls.UI.TextBoxNavigator.GetPositionFromOffset(Int32 offset)
   at Telerik.WinControls.UI.RadTextBoxControlElement.Select(Int32 start, Int32 length)
   at Telerik.WinControls.UI.RadTextBoxControlEditor.EndEdit()
   at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
   at Telerik.WinControls.UI.GridViewEditManager.CloseEditor()
Completed
Last Updated: 22 Jun 2021 17:27 by ADMIN
Release R3 2021

Use the following code snippet:

https://docs.telerik.com/devtools/winforms/styling-and-appearance/using-a-default-theme-for-the-entire-application#enabledisable-the-globally-set-theme-for-a-specific-control 

 

            ThemeResolutionService.ApplicationThemeName = "MaterialPink";
            radGridView1.ElementTree.EnableApplicationThemeName = false;
            radGridView1.ThemeName = "FluentDark";

Workaround:

        private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
        {
            RadDropDownListEditor ddlEditor = e.ActiveEditor as  RadDropDownListEditor;
            if (ddlEditor != null)
            {
                RadDropDownListEditorElement el = ddlEditor.EditorElement as RadDropDownListEditorElement;
                el.Popup.ElementTree.EnableApplicationThemeName = false;
                el.Popup.ThemeName = this.radGridView1.ThemeName;
            }
        }