Unplanned
Last Updated: 17 Apr 2024 14:40 by ADMIN

Steps to reproduce:

1. Bind the grid to BindingList

2. Call BestFitColumns method in form's constructor

3. Use Fluent/Crystal theme

4. Rebind the grid by setting DataSource=null

5. Exception is thrown

Stack trace:

en Telerik.WinControls.UI.BestFitHelper.SetColumnWidth(GridViewColumn column, Single desiredWidth)
   en Telerik.WinControls.UI.BestFitHelper.BestFitColumnCore(GridViewColumn column, BestFitColumnMode mode)
   en Telerik.WinControls.UI.BestFitHelper.ProcessRequests()
   en Telerik.WinControls.UI.GridTableElement.UpdateAll()
   en Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
   en Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
   en Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
   en Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
   en Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
   en Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
   en Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
   en Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
   en Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
   en Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
   en Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
   en Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
   en Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   en Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   en Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   en Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
   en Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
   en Telerik.WinControls.Data.RadDataView`1.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   en Telerik.WinControls.Data.RadCollectionView`1.source_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.RadListSource`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   en Telerik.WinControls.Data.RadListSource`1.EndUpdate(Boolean notifyUpdates)
   en Telerik.WinControls.Data.RadListSource`1.Initialize()
   en Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
   en Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
   en Telerik.WinControls.UI.GridViewTemplate.set_DataSource(Object value)
   en Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)

Unplanned
Last Updated: 17 Apr 2024 14:40 by ADMIN
When you inspect a RadGridView Cell with the inspect.exe tool you will see that the Value property is empty.
Unplanned
Last Updated: 17 Apr 2024 14:37 by ADMIN
To reproduce: add a RadGridView with several columns. Set the Enabled property to false. Try to open the Property Builder and you will notice that the Columns are disabled in it.

Workaround: set the Enabled property to false at run time. Thus, it would be possible to manipulate the columns via the Property Builder at design time.
Unplanned
Last Updated: 17 Apr 2024 14:36 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
2
To reproduce:

Please run the sample project and follow the steps from the gif file.

Workaround:

        private void radGridView1_SizeChanged(object sender, EventArgs e)
        {
            this.radGridView1.MasterTemplate.Refresh();
        }

        public class Grid : RadGridView
        {
            public override string ThemeClassName  
            { 
                get 
                { 
                    return typeof(RadGridView).FullName;  
                }
            }

            protected override void OnResize(EventArgs e)
            {
                object value = null;
                if (this.ActiveEditor != null)
                { 
                    value = this.ActiveEditor.Value;  
                }
                base.OnResize(e);
                if (value != null && this.CurrentCell != null)
                {
                    this.CurrentCell.Value = value;
                }
            }
        }
Unplanned
Last Updated: 17 Apr 2024 14:35 by ADMIN
To reproduce: please refer to the attached sample project. Note that the CellValidating event is fired twice even without showing a RadMessageBox. With an MS Button the problem is not reproducible.

Workaround: use the RadGridView.ValueChanging event to perform validation while the user is typing in the active editor:
 private void radGridView1_ValueChanging(object sender, Telerik.WinControls.UI.ValueChangingEventArgs e)
 {
   if (((string)e.NewValue) != "x")
     {
         RadMessageBox.Show("Only 'x' allowed!");
         e.Cancel = true;
     }
 }

Unplanned
Last Updated: 17 Apr 2024 14:30 by ADMIN

I have a radGridView with MutliSelect set to true and SelectionMode set to FullRowSelect. A theme is applied, and this behavior is seen with other themes too. Several columns are pinned to the left.

When I multi-select rows using the shift or control buttons by clicking one of the cells under the frozen columns, the row is selected and colored accordingly, except for the cell that was actually clicked which remains with the unselected color.

If I multi-select by clicking on one of the cells under an unpinned column, the full row is selected as expected.

In the image below, I held down shift and selected the first and third row in sequence under the Officer column.

How can I fix this to show the complete row selected?

   
Unplanned
Last Updated: 17 Apr 2024 14:29 by ADMIN
To reproduce:
ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));

view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
view.ColumnGroups[0].Rows[0].ColumnNames.Add("Address");
view.ColumnGroups[0].Rows[0].ColumnNames.Add("Contact");

radGridView1.Columns.Add("Address");
radGridView1.Columns.Add("Contact");

radGridView1.Columns[0].Width = 300;
radGridView1.Columns[1].Width = 300;
radGridView1.ViewDefinition = view;

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

Workaround:
docs.telerik.com/devtools/winforms/telerik-presentation-framework/export-renderers/spreadexportrenderer
Unplanned
Last Updated: 12 Apr 2024 05:46 by Evaristo
To reproduce the issue:
Click the first cell of a column
Scroll down and press Shift key and click the last cell of the column
Check that total rows label is 20.000 but selected cells label is less than 19.997
Completed
Last Updated: 28 Mar 2024 12:09 by ADMIN
When Excel-like filtering is enabled and the user selects an item from the "Available Filters" drop down menu, a CompositeFilterForm is shown.
Unplanned
Last Updated: 20 Mar 2024 13:10 by ADMIN
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 20:30 by ADMIN
Fatching data from sql database in gridViewCommboBoxColumn select the value then retrieve data other column in the same Rows windows application in Vb.net
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: 06 Feb 2024 12:56 by ADMIN
Created by: Paul Dell
Comments: 2
Category: GridView
Type: Feature Request
1
Hello, i am using the GridViewSpreadStreamExport to export a gridview with parent and child rows.
Everithing works fine but is it possible to set the parent row to collapsed, if there are child rows?
Unplanned
Last Updated: 31 Jan 2024 11:50 by ADMIN
I had the following code:
RadGridview 1.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.HeaderCells)