Hello,
We are experiencing a strange behaviour of RadGridView set as a self referencing hierarchy when used with Excel filters.
Once we use predefined filter values (both, build-in and custom defined by us) the filter icon is highlitghted when none of the filter is marked. This higlight can be removed when clear filters button of filter popup is used or FilterDescriptors are cleared. If we do not clear the filters manually, and, for instance, sort grid column the application crashes with internal error of the grid. Error reads Object reference not set to an instance of object.
Attached movie will explain it better. I have also attached a ver simple sample project with data (which does not make sense, just for visualisation) that should fail when you repeat steps described above (turn today or last 7 days filter, apply, select no filter, apply and try to sort the same column).
Is there a workaround or specific conditions we need to apply to have it working?
Thanks for your advice.
I'm also attaching errors details:
Steps to reproduce:
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)To reproduce: please refer to the attached gif file. Apply a conditional formatting rule for the current time's minute. Then, after a minute later, try to edit the already applied rule and change the minute value, you will notice that the color is cleared, but the new one is not applied. Workaround: use the CellFormatting event https://docs.telerik.com/devtools/winforms/gridview/cells/formatting-cells
Please refer to the attached sample project. When the expander is in the columns that contains long text that has be resize the rows, the AutoSizeRows functionality doesn't work properly:
Workaround: set the MasterTemplate.SelfReferenceExpanderColumn property to a column that contains very short content:
Me.RadGridView1.MasterTemplate.SelfReferenceExpanderColumn = Me.RadGridView1.Columns(1)Hi,
Please check the attached sample project.
I think CompositeFilter does not respect CaseSensitive property.
Thanks
When RadGridView is bound to a collection of 60 000 records the difference in the sorting time between using a ProBindingSource and a DataTable is massive. Changes in any core logic in both internal implementations, RadGridView and ProBindingSource, isn't so easy as it looks. Both products have been for a very long time on the market designed to cover the main scenarios of the target customers groups for which they are developed.
By default, if the rows count is less than 10 000 we use quick sort to order the items in the grid. If there are more items we use Red-Black tree. This is controlled by the UseHybridIndex property.
(radGridView.MasterTemplate.ListSource.CollectionView as GridDataView).UseHybridIndex = false;However, both of algorithms use non-linear data access. If the ProBindingSource is not optimized to get data not linearly, the performance wouldn't be satisfactory.
That is why we have introduced the BypassSort functionality to cover this case after cooperation with the OE developers. Thus, our RadGridView won't perform any logic for sorting and the whole time necessary for sorting will depend on the DataSource itself (ProBindingSource in your case) and how this collection sorts its items: https://docs.telerik.com/devtools/winforms/controls/gridview/sorting/basic-sorting
In the current version of Telerik UI for WinForms suite, the BypassSort property is ignored if the BypassFilter is not set to true as well. Hence, the sorting will be still slow.
Both properties shouldn't affect each other and if a developer wants to improve only the sorting performance, it is expected to enable only the ByPassSort property.
Hello.
In my application, depending on the specific data in the grid I may want to warn a user who clicks on the header checkbox that changing all the values in that column may not be what he intends, allowing him to cancel out of the operation. I haven't found a handler that gets called when clicking on the header checkbox that allows me to cancel the event. How can I accomplish this?
Please follow the instruction in this help article: https://docs.telerik.com/devtools/winforms/controls/spellchecker/spellchecking-radgridview
Then, follow the steps illustrated in the attached gif file.
Please refer to the attached sample project and follow the steps illustrated in the gif file.
The issue is also reproducible in the Demo application.
Workaround: in the RadDataFilter.Edited event you can use the Expression to filter the grid:
Me.RadGridView1.FilterDescriptors.Expression = Me.RadDataFilter1.Expression
Steps to reproduce:
1. Bind RadGridView to BindingList
2. Clear the rows collection
3. You can see that SelectedRows.Count =1 although Rows.Count = 0
To workaround:
private void radButton1_Click(object sender, EventArgs e)
{
while (this.pedidos.Count > 0)
{
this.pedidos.RemoveAt(0);
}
int rows = this.radGridView1.Rows.Count;
int srows = this.radGridView1.SelectedRows.Count;
}
Hello,
I am using a radGridView on a Windows touch screen. When I am trying to scroll the rows by hand (EnableKineticScrolling was set to true), the scrolling process is very slow. If I will use the vertical scrollbar, then it is ok. How can I achieve this without using the vertical scrollbar?
I used EnableFastScrolling=true, but I did not see any improvement.
Regards,
Yannis
Please refer to the attached sample project and the follow the steps in the gif file.
Workaround: scroll to the top and then to the bottom again to update the scrollbar's range
Hi,
I have to transfer data from gridview to a .xlsm file which is for the salary transfer to the bank from the application (Template given by the Bank).
File screenshot attached.
Need to fill the cells from the loaded gridview to this template.
Please help; I have searched a lot but no luck.
Thank you very much.
Hi,
I am working with the RadGridView in my c# winform application. I am using the custom font ("Font Awesome 5 Free Solid") for the RadGridView using the "CellFormatting" event to view the icons along with the text. Here i am able to see the proper icons with text but when i open the filter menu to filter out the rows, i am unable to see the icons (icons shown as the box) as in filterbox we don't have any custom font.
I tried to working out the properties of the RadTreeNodeCollection but here we dont have any Custom font property for the same.
i want to show the text as it is in the filterbox along with the text and the icon.
so can you suggest what i can do to view the icons in the filterbox?
Check the attachment for reference.