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 refer to 2 attached files...
The 'April 2020' file is correct - The yellow color is shown upon setting a filter (Release 2020.1.113.40)
The 'June 2020' file is incorrect - No color is shown indicating filter is set. (Release 2020.2.512.40)
The code sets FilterDescriptor on the 'A PARTY' column.
There is change in the icon of the filter as well :(
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?
Hi,
Please check the attached sample project.
I think CompositeFilter does not respect CaseSensitive property.
Thanks
Good afternoon,
I was wondering if anyone could help me with a GridView export issue I am having.
I am populating a GridView from an SQL query. This table has two DateTime columns that I am formatting after the DataBindingComplete to show the milliseconds portion of the DateTime field like so:
private
void
dgvTransTable_DataBindingComplete(
object
sender, GridViewBindingCompleteEventArgs e)
{
for
(
int
j = 0; j <
this
.dgvTransTable.Columns.Count; j++)
{
if
(
this
.dgvTransTable.Columns[j].GetType() ==
typeof
(Telerik.WinControls.UI.GridViewDateTimeColumn))
{
((GridViewDateTimeColumn)
this
.dgvTransTable.Columns[j]).FormatString =
"{0:MM/dd/yyyy hh:mm:ss.fff}"
;
}
}
}
Works great. Column displays just like I want. Now the problem is with the Excel Export. Normally with the format cell options, you can use .000 for milliseconds. I just can't seem to get it correct with the GridViewSpreadExport. This is what I am trying, note I've also tried using the .fff but it both cases, all that is written to the Excel cell is the short date/time string, and the formatting looks like I want, except either just the literal .fff or .000 show up in the visual cell.
I'd even be happy if someone knows how to make this field export as a straight text field as long as the string is formatted like the gridview cell.
foreach
( GridViewDataColumn col
in
dgvTransTable.Columns )
{
switch
( col.DataType.Name )
{
case
nameof(DateTime):
col.ExcelExportType = Telerik.WinControls.UI.Export.DisplayFormatType.Custom;
col.ExcelExportFormatString =
"MM/dd/yyyy hh:mm:ss.000"
;
break
;
}
}
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
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.
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
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.
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.
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,
when I select the column chooser multiple times via context menu, the column chooser dialog scales multiple times.
Reproduced here with the Telerik sample application. 150 % dpi scaling.
Regards
Erwin
I'm just starting with RadGridView and trying to figure out how to create a combobox column inside my RadGridView. I've added a column that is of type GridViewComboBoxColumn. I've created a BindingSource that Contains the values for the combobox. I can't figure out how to set the datasource property of the Column to use that BindingSource. Google search says to set the datasource property but when I'm going through the "Open Properties Builder" and I select my combobox column I don't see that property listed under advanced for the column.
Thanks
Lee
If you want to use Conditional Formatting via code (expression based formatting) you will see that it throws an exception if you set TRIM() condition.
ExpressionFormattingObject expressionCondition = new ExpressionFormattingObject(
expressionCondition.Expression = "TRIM(ContactName) = 'Maria Anders'";
expressionCondition.CellBackColor = Color.Aqua;
this.radGridView1.Columns["CustomerID"].ConditionalFormattingObjectList.Add(expressionCondition);
There is no exception if you use the same condition via "Conditional Formatting Rules Manager" form.