Unplanned
Last Updated: 05 Apr 2024 11:00 by ADMIN

Run the attached project on a monitor with 100% DPI scaling and open the Excel-like filter popup:

100%:

After moving the form to the second monitor with 150% DPI scaling, the filter popup is not OK:

150%:

The popup is smaller and smaller with each next opening (see the attached gif file) at 150%. If you decide to move back the form on the monitor with 100% DPI scaling, the filter popup is not scaled properly.

Completed
Last Updated: 13 Mar 2024 08:49 by ADMIN
Release 2024.1.312
When I work with RadGridView component, the "RadGridView Property Builder" closes unexpectedly. It happens when I make the following steps:

1. RadGridView properties AutoSizeRow set to true.

2. Column Group properties ShowHeader set to false. 
Completed
Last Updated: 13 Mar 2024 08:49 by ADMIN
Release 2024.1.312
Unplanned
Last Updated: 04 Mar 2024 05:59 by Juha
1. I click a user control in the map view that has a row with value "Vite". This works fine because it doesn't have a lot of rows under the parent row.
2.Then I click the user control in the map view that has a row with value "TASÄ". This time the grid scrolls to an incorrect position. The corresponding row is a lot lower in the child list.
Unplanned
Last Updated: 01 Mar 2024 15:23 by ADMIN
In a GridView, if there is at the same time in a column empty cells and the value (Blanks), the filter box will fail to open.
Declined
Last Updated: 16 Feb 2024 22:24 by ADMIN

C#. net core 6, winforms application, TekerikNuGet3 package source, UI.for.WinForms.AllControls.NetCore package 2022.2.622

I am trying to export selected cells from a RadGridView as a csv file.

When using "var exporter = new ExportToCSV(Dgv)" then "exporter.RunExport(fileName);" writes the csv file correctly. It exports every cell.

It doesn't support exporting selections so I wrote a function to do this . The one below is what I used in my project to test what I was doing. It initially writes the csv to a worksheet and wrote that using formatprovider to file, then I just created a stringbuilder adding quotes and appended that to the file afterwards.

Writing the worksheet, the csv values haven't been quoted, plus number fields have had leading zeros removed which proves to be a problem when telephone numbers are stored in a field.

So I googled and found the Settings property which is there to set csv options. But they are private, not public therefore I can't set up the csv propertly.

private void radButton1_Click(object sender, EventArgs e)
  {

    var workbook = new Workbook();
    var worksheet = workbook.Worksheets.Add();

    var rowIndex = 0;
    var columnIndex = -1;
    var sb = new StringBuilder();
    var prevColumnIndex = -1;

    // ForEach cell are accessed vertically then horizontally.
    foreach (var cell in Dgv.SelectedCells)
    {
      // Cell is included in selection even if it's invisible
      // so check visibility and ignore if it isnt
      if (!cell.ColumnInfo.IsVisible) continue;

      // At bottom of column, rownum will change. Watch for this
      // and reset x and y values
      var rowNum = cell.RowInfo.Index;
      if (rowNum != prevColumnIndex)
      {
        prevColumnIndex = rowNum;
        rowIndex = 0;
        columnIndex++;
        sb.AppendLine("");
      }
      else if (!string.IsNullOrEmpty(sb.ToString()))
        sb.Append(",");

      var value = cell.Value;
      worksheet.Cells[columnIndex, rowIndex++ ].SetValue(value.ToString());
      sb.Append($"\"{value.ToString()}\"");
    }

    var fileName = @"C:\temp\SampleFile.csv";

    IWorkbookFormatProvider formatProvider = new CsvFormatProvider();
    using var output = new FileStream(fileName, FileMode.Create);
    formatProvider.Export(workbook, output);
    output.Close();

    // Write contents of sb to the file for comparison sake
    File.AppendAllText(fileName, sb.ToString());

  }

Declined
Last Updated: 16 Feb 2024 19:51 by ADMIN
Created by: Lior
Comments: 2
Category: GridView
Type: Bug Report
0

i am getting a null reference exception with the following call stack:

 

Description: The process was terminated due to an unhandled exception.

Exception Info: System.NullReferenceException

   at Telerik.WinControls.UI.TableViewRowLayoutBase.GetRowHeight(Telerik.WinControls.UI.GridViewRowInfo)

   at Telerik.WinControls.UI.RowElementProvider.GetElementSize(Telerik.WinControls.UI.GridViewRowInfo)

   at Telerik.WinControls.UI.ItemScroller`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetScrollHeight(System.__Canon)

   at Telerik.WinControls.UI.ItemScroller`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ScrollDown(Int32)

   at Telerik.WinControls.UI.ItemScroller`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ScrollTo(Int32)

   at Telerik.WinControls.UI.ItemScroller`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].scrollbar_ValueChanged(System.Object, System.EventArgs)

   at Telerik.WinControls.UI.RadScrollBarElement.OnValueChanged(Int32, Int32)

   at Telerik.WinControls.UI.RadScrollBarElement.set_Value(Int32)

   at Telerik.WinControls.UI.ItemScroller`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].UpdateScrollValue()

   at Telerik.WinControls.UI.ItemScroller`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].UpdateScrollRange()

   at Telerik.WinControls.UI.RowScroller.UpdateScrollRange()

   at Telerik.WinControls.UI.GridTableElement.UpdateNoDataText()

   at Telerik.WinControls.UI.GridTableElement.UpdateAll()

   at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(System.Object, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.GridTableElement.UpdateView(System.Object, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(Telerik.WinControls.UI.GridViewEvent)

   at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(Telerik.WinControls.UI.GridViewEvent)

   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(Telerik.WinControls.UI.GridViewEvent, Telerik.WinControls.UI.PriorityWeakReferenceList, Telerik.WinControls.UI.GridEventProcessMode)

   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(Telerik.WinControls.UI.GridViewEvent)

   at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(Telerik.WinControls.UI.GridViewEvent)

   at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()

   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(Telerik.WinControls.UI.GridViewEvent)

   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(Telerik.WinControls.UI.GridViewTemplate, Telerik.WinControls.UI.GridViewEvent, Boolean)

   at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(Telerik.WinControls.UI.GridViewEvent, Boolean)

   at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(System.Object, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(System.Object, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(System.Object, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.GridViewTemplate.EndUpdate(Boolean, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.MasterGridViewTemplate.EndUpdate(Boolean, Telerik.WinControls.UI.DataViewChangedEventArgs)

   at Telerik.WinControls.UI.GridViewTemplate.set_RowCount(Int32)

   at Telerik.WinControls.UI.RadGridView.set_RowCount(Int32)

   at Communication_Logger.frmCommunicationLogger.RadRibbonForm1_OnDataReceived(Communication_Logger.Data)

   at Communication_Logger.ChannelClass.Serial_DataReceived(System.Object, System.IO.Ports.SerialDataReceivedEventArgs)

   at System.IO.Ports.SerialPort.CatchReceivedEvents(System.Object, System.IO.Ports.SerialDataReceivedEventArgs)

   at System.IO.Ports.SerialStream+EventLoopRunner.CallReceiveEvents(System.Object)

   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

   at System.Threading.ThreadPoolWorkQueue.Dispatch()

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

 

the setup is a dotNet 4.5.2 winforms application with RadGridView in virtual mode.

The exception occur when the application is left working for days (2 in this case) without any user interaction.

The application normally updates a list that is used by the gridview, the list records are added and removed continuously, the grid view RowCount is updated via a timer.

i suspect that the RowCount reported at one point in time doesn't match the list size as it is trimmed, and therfore the GetRowHeight fails as the data doesn't exist - can this be handled in the gridview - to avoid a termination of the process due to the exception ?

 

regards,

guy.

 

Unplanned
Last Updated: 06 Feb 2024 13:04 by ADMIN
In this case, the control has multiple columns. Some of them are not visible in the view, you will need to scroll to the end. When moving a DateTime column to the end of the control and editing twice its filter cell, a NullReferenceException is raised. 
Unplanned
Last Updated: 31 Jan 2024 11:50 by ADMIN
I had the following code:
RadGridview 1.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.HeaderCells)


Completed
Last Updated: 31 Jan 2024 11:39 by ADMIN
Release 2024 Q1 (2024.1.130)

In this case, the culture of the application is different from the culture of the machine. In this particular case, both cultures have different long date time format strings. current format mm/dd/yyyy compare to the one which the control is loading dd/mm/yyyy.

As a workaround, we can apply InvariantCulture before loading the XML and return the previous one after this:

CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
grid.LoadLayout(xml);
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en-US");

 

Unplanned
Last Updated: 24 Jan 2024 17:02 by ADMIN

To reproduce use the code below:

DataTable table = new DataTable();
for (int i = 0; i < 20; i++)
{
    table.Columns.Add("Left" + i, typeof(int));
    table.Columns.Add("Right" + i, typeof(int));
}

for (int i = 0; i < 27; i++)
{
    List<object> parameters = new List<object>();
    for (int j = 0; j < table.Columns.Count - 2; j++)
    {
        parameters.Add(100 * i + i);
    }

    table.Rows.Add(parameters.ToArray());
}

this.radGridView1.DataSource = table;

ColumnGroupsViewDefinition def = new ColumnGroupsViewDefinition();
for (int i = 0, j = 0; i < 20; i++)
{
    var group = new GridViewColumnGroup("Group" + 3 + i);
    def.ColumnGroups.Add(group);
    group.Groups.Add(new GridViewColumnGroup("0"));
    group.Groups[0].Rows.Add(new GridViewColumnGroupRow() { MinHeight = 30});
    group.Groups[0].Rows[0].ColumnNames.Add(this.radGridView1.Columns[j].Name);
    this.radGridView1.Columns[j].Width = 58;
    j++;
    group.Groups[0].Rows[0].ColumnNames.Add(this.radGridView1.Columns[j].Name);
    this.radGridView1.Columns[j].Width = 58;
    j++;
}

radGridView1.MasterTemplate.ShowRowHeaderColumn = false;
this.radGridView1.ViewDefinition = def;

// To Export:
GridViewPdfExport pdfExport = new GridViewPdfExport(this.radGridView1);
pdfExport.FitToPageWidth = false;
pdfExport.ExportViewDefinition = true;
pdfExport.ExportVisualSettings = true;
pdfExport.RunExport(@"..\..\pdf", new PdfExportRenderer());

This is the result on the second page. Overlapped groups header cells, overlapped data cells, which results in unreadable text.

  

Unplanned
Last Updated: 04 Dec 2023 13:12 by ADMIN
Hi,
There is a bug with your Grid decimal filtering when the FieldName matches the Name property for a different column. The filter is filtering on the column's Name instead of the FieldName. 
Completed
Last Updated: 11 Oct 2023 10:11 by ADMIN
Release R3 2023
Changes to the bonded ObservableCollection are not reflected in the control
Completed
Last Updated: 11 Oct 2023 10:09 by ADMIN
Release R3 2023

To reproduce:

      public RadForm1()
      {
         InitializeComponent();
         PopulateGrid();
      }

      private void radButton1_Click(object sender, EventArgs e)
      {
         GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
         SpreadExpo

rtRenderer exportRenderer = new SpreadExportRenderer();
         spreadExporter.ExportHierarchy = true;
         spreadExporter.ExportVisualSettings = true;
         spreadExporter.ChildViewExportMode = Telerik.WinControls.UI.Export.ChildViewExportMode.ExportAllViews;

         string fileName = @"..\..\exportedFile" + DateTime.Now.ToLongTimeString().Replace(":", "_") + ".xlsx";
         spreadExporter.RunExport(fileName, exportRenderer);
         Process.Start(fileName);
      }

      public void PopulateGrid()
      {
         List<GridResults.ChildCollectionFirst> firstCollection = new List<GridResults.ChildCollectionFirst>
         {
            new GridResults.ChildCollectionFirst
            {
               Test1 = "First Child"
            }
         }.ToList();

         List<GridResults.ChildCollectionSecond> secondCollection = new List<GridResults.ChildCollectionSecond>
         {
            new GridResults.ChildCollectionSecond
            {
               Test2 = "Second Child"
            }
         }.ToList();

         List<GridResults.ChildCollectionThird> thirdCollection = new List<GridResults.ChildCollectionThird>
         {
            new GridResults.ChildCollectionThird
            {
               Test3 = "Third Child"
            }
         }.ToList();

         List<GridResults.ChildCollectionFourth> fourthCollection = new List<GridResults.ChildCollectionFourth>
         {
            new GridResults.ChildCollectionFourth
            {
               Test4 = "Fourth Child"
            }
         }.ToList();


         var resultsList = new List<GridResults>
         {



            new GridResults
            {
               Id = "First Parent",
               Value = "Test Value 1",
               ChildCollection1 = new List<GridResults.ChildCollectionFirst>(),

               ChildCollection2 = new List<GridResults.ChildCollectionSecond>(),

               ChildCollection3 = new List<GridResults.ChildCollectionThird>(),

               ChildCollection4 = new List<GridResults.ChildCollectionFourth>()
            },
            new GridResults
            {
               Id = "Second Parent",
               Value = "Test Value 2",
               ChildCollection1 = firstCollection,

               ChildCollection2 = secondCollection,

               ChildCollection3 = thirdCollection,

               ChildCollection4 = fourthCollection
            },

            new GridResults
            {
            Id = "Third Parent",
            Value = "Test Value 3",
            ChildCollection1 = new List<GridResults.ChildCollectionFirst>(),

            ChildCollection2 = new List<GridResults.ChildCollectionSecond>(),

            ChildCollection3 = new List<GridResults.ChildCollectionThird>(),

            ChildCollection4 = new List<GridResults.ChildCollectionFourth>()
         },
            new GridResults
            {
               Id = "Fourth Parent",
               Value = "Test Value 4",
               ChildCollection1 = new List<GridResults.ChildCollectionFirst>(),

               ChildCollection2 = new List<GridResults.ChildCollectionSecond>(),

               ChildCollection3 = new List<GridResults.ChildCollectionThird>(),

               ChildCollection4 = new List<GridResults.ChildCollectionFourth>()
            },
            new GridResults
            {
            Id = "Fifth Parent",
            Value = "Test Value 5",
            ChildCollection1 = new List<GridResults.ChildCollectionFirst>(),

            ChildCollection2 = new List<GridResults.ChildCollectionSecond>(),

            ChildCollection3 = new List<GridResults.ChildCollectionThird>(),

            ChildCollection4 = new List<GridResults.ChildCollectionFourth>()
         },
         new GridResults
         {
            Id = "Sixth Parent",
            Value = "Test Value 6",
            ChildCollection1 = new List<GridResults.ChildCollectionFirst>(),

            ChildCollection2 = new List<GridResults.ChildCollectionSecond>(),

            ChildCollection3 = new List<GridResults.ChildCollectionThird>(),

            ChildCollection4 = new List<GridResults.ChildCollectionFourth>()
         }

         };
      //   radGridView1.BeginUpdate();
         radGridView1.DataSource = resultsList;
      //   radGridView1.EndUpdate();

            foreach (GridViewTemplate t in this.radGridView1.Templates)
            {
                t.AutoSizeColumnsMode= GridViewAutoSizeColumnsMode.Fill;
            }
      }

   public class GridResults
   {
      [DisplayName("ID")]
      public string Id { get; set; }

      [DisplayName("Value")]
      public string Value { get; set; }

      [DisplayName("Child Collection 1")]
      public List<ChildCollectionFirst> ChildCollection1 { get; set; }

      [DisplayName("Child Collection 2")]
      public List<ChildCollectionSecond> ChildCollection2 { get; set; }

      [DisplayName("Child Collection 3")]
      public List<ChildCollectionThird> ChildCollection3 { get; set; }

      [DisplayName("Child Collection 4")]
      public List<ChildCollectionFourth> ChildCollection4 { get; set; }

      [DisplayName("Child Collection 1")]
      public class ChildCollectionFirst
      {
         [DisplayName("Test Header")]
         public string Test1 { get; set; }
      }

      [DisplayName("Child Collection 2")]
      public class ChildCollectionSecond
      {
         [DisplayName("Test Header 2")]
         public string Test2 { get; set; }
      }

      [DisplayName("Child Collection 3")]
      public class ChildCollectionThird
      {
         [DisplayName("Test Header 3")]
         public string Test3 { get; set; }
      }

      [DisplayName("Child Collection 4")]
      public class ChildCollectionFourth
      {
         [DisplayName("Test Header 4")]
         public string Test4 { get; set; }
      }
   }

The observed result with duplicated rows is demonstrated here:

 

Unplanned
Last Updated: 04 Oct 2023 08:24 by ADMIN

There is a sample project attached and the result is illustrated below:

200%:

100%:

 

 

Unplanned
Last Updated: 02 Oct 2023 08:42 by ADMIN

When typing text in a new row in the RadGridView control with Windows 11 theme, the text appears to be moved down from the top of the row and makes it look like it is hidden, thus making it hard to see. 

I am using all the defaults of the RadGridView control with AutoSizeRows = true.

Completed
Last Updated: 16 Aug 2023 10:51 by ADMIN
Release R3 2023 (LIB 2023.2.816)

Please refer to the attached sample video.

StackTrace: 

Message: Object reference not set to an instance of an object.
Telerik.WinControls.UI.RadGridViewDragDropService.GetDragImageHint(ContentAlignment textAlignment, Bitmap hintImage, RectangleF textRectangle, Int32 hintImageWidth)
Telerik.WinControls.UI.ColumnChooserItem.GetDragHintCore()
Telerik.WinControls.RadItem.Telerik.WinControls.ISupportDrag.GetDragHint()
Telerik.WinControls.RadDragDropService.PrepareContext():80
Telerik.WinControls.RadDragDropService.HandleMouseMove(Point mousePos):40
Telerik.WinControls.UI.RadGridViewDragDropService.HandleMouseMove(Point mousePosition):13
Telerik.WinControls.RadDragDropService.Telerik.WinControls.IMessageListener.PreviewMessage(Message& msg):150
Telerik.WinControls.RadMessageFilter.NotifyGetMessageEvent(Message& msg):41
Telerik.WinControls.RadMessageFilter.GetMessageHookProc(Int32 code, IntPtr wParam, IntPtr lParam):36

Completed
Last Updated: 16 Aug 2023 10:51 by ADMIN
Release R3 2023 (LIB 2023.2.816)

Code snippet for reproducing the error: 

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Title", typeof(string));
            dt.Columns.Add("Price", typeof(decimal));

            for (int i = 0; i < 10; i++)
            {
                dt.Rows.Add(i, "Row" + i, 0);
            }

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

            GridViewSummaryItem summaryItem = new GridViewSummaryItem();
            summaryItem.Name = "Price";
            summaryItem.Aggregate = GridAggregateFunction.StDev;
            GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem();
            summaryRowItem.Add(summaryItem); 
            this.radGridView1.SummaryRowsBottom.Add(summaryRowItem);

Declined
Last Updated: 27 Jul 2023 12:43 by ADMIN
When the FreeFormDateTime mask type is used with the RadDateTimeEditor, the Validate method is not called again after entering an invalid value. Even if we type a valid date afterward, the control rollback to the previous value of the cell.