I have tested in brand new projects (.NET 6 and .NET Framework) and the default functionality of the drag drop services in RadScheduler and RadGridView. Indeed, the cursor is missing in .NET 6. The following screenshots illustrate the difference.
.NET 6:
Add heatmap control as in the WPF suite http://www.telerik.com/products/wpf/heatmap.aspx
Use the code below and click the button to make the grid ReadOnly:
public TestForm()
{
InitializeComponent();
GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn("checkbox");
checkBoxColumn.EnableHeaderCheckBox = true;
this.radGridView1.Columns.Add(checkBoxColumn);
this.radGridView1.Columns.Add("text");
this.Shown += TestForm_Shown;
}
private void TestForm_Shown(object sender, EventArgs e)
{
this.radGridView1.Columns["checkbox"].IsVisible = !this.radGridView1.Columns["checkbox"].IsVisible;
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radGridView1.ReadOnly = !this.radGridView1.ReadOnly;
}
Steps that lead to the undesired behavior:
1. Create a VB project with one of the templates:
2. Initially, there is no subscription to the CalendarUserControl.Load event:
3. After opening the designer, you are subscribing to the Load event by double-clicking the Load event in the Properties section:
Then, the generated event handler is underlined as in the above screenshot.
According to PDF format specification, there are three valid encoding name values (MacRomanEncoding, MacExpertEncoding and WinAnsiEncoding). There are documents that instead of skipping the optional Encoding property, are writing invalid /NULL name value in the font dictionary. Currently, in this invalid document scenario RadPdfViewer throws and catches Exception and this results in missing text content. We may handle this invalid document scenario by ignoring the invalid Encoding value.
Our clients can download different product files from their Telerik account:
https://docs.telerik.com/devtools/winforms/installation-and-upgrades/download-product-files
Currently, when Digitally Signed Assemblies are necessary, they submit support tickets and the support engineers provide the signed assemblies. It would be nice to be directly uploaded to the Telerik account like the rest of the product files.
I downloaded the ERP demo from here: https://www.telerik.com/support/code-library/erp-demo-application-for-winforms
After upgrading the projects to .NET 4.8 and running the application, the following exception is observed:
The full stack trace:
System.Data.Services.Client.DataServiceTransportException HResult=0x80131509 Message=Unable to connect to the remote server Source=Microsoft.Data.Services.Client StackTrace: at System.Data.Services.Client.HttpWebRequestMessage.GetResponse() at System.Data.Services.Client.DataServiceContext.GetResponseHelper(ODataRequestMessageWrapper request, IAsyncResult asyncResult, Boolean handleWebException) at System.Data.Services.Client.QueryResult.ExecuteQuery() at System.Data.Services.Client.DataServiceRequest.GetQuerySetCount(DataServiceContext context) at System.Data.Services.Client.DataServiceQueryProvider.ReturnSingleton[TElement](Expression expression) at ERP.Client.PurchasesControl.Initialize() in C:\Users\dyordano\Downloads\009a20df-21b2-4e64-b129-eaf9e0a686f5_ERP-CS (1)\ERP.Client\CustomControls\Views\PurchasesControl.cs:line 48 at ERP.Client.BaseGridControl..ctor() in C:\Users\dyordano\Downloads\009a20df-21b2-4e64-b129-eaf9e0a686f5_ERP-CS (1)\ERP.Client\CustomControls\BaseGridControl.cs:line 49 at ERP.Client.PurchasesControl..ctor() in C:\Users\dyordano\Downloads\009a20df-21b2-4e64-b129-eaf9e0a686f5_ERP-CS (1)\ERP.Client\CustomControls\Views\PurchasesControl.cs:line 29 This exception was originally thrown at this call stack: System.Net.Sockets.Socket.DoConnect(System.Net.EndPoint, System.Net.SocketAddress) System.Net.ServicePoint.ConnectSocketInternal(bool, System.Net.Sockets.Socket, System.Net.Sockets.Socket, ref System.Net.Sockets.Socket, ref System.Net.IPAddress, System.Net.ServicePoint.ConnectSocketState, System.IAsyncResult, out System.Exception) Inner Exception 1: WebException: Unable to connect to the remote server Inner Exception 2: SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.52.19.99:80
It seems that this is a regression in R1 2023 SP1 after addressing this item:
We work with a RadGridView with 145000 rows and 4 columns. We use copy-paste to move data around from other apps and the application with build with Telerik.
When we copy a flat file (with tabs delimited fields) and we paste it to the RadGridView, the whole process is painfully slow. The function to retrieve the data from the clipboard takes minutes (maybe hours, I cancelled it). It tracked the cause down to the StringTokenizer class. The tokenizer splits the string up into separate fields. But after extracting a field it creates a new copy of that string (containing about 10MB of data) minus the field. I patched it (with HarmonyX) and now it takes only one second:
static class StringTokenizerPerformancePatch
{
static private readonly InstanceFieldAccessor<StringTokenizer, LinkedList<string>> _tokens = new InstanceFieldAccessor< StringTokenizer, LinkedList<string>>("tokens");
static private readonly InstanceFieldAccessor<StringTokenizer, string> _sourceString = new InstanceFieldAccessor<StringTokenizer, string>("sourceString");
static private readonly InstanceFieldAccessor< StringTokenizer, string> _delimiter = new InstanceFieldAccessor<StringTokenizer, string>("delimiter");
static private readonly InstanceFieldAccessor< StringTokenizer, IEnumerator<string>> _enumerator = new InstanceFieldAccessor<StringTokenizer, IEnumerator<string>>("enumerator");
[HarmonyPatch(typeof(StringTokenizer), "Tokenize")]
staticclassPatch_StringTokenizer_Tokenize
{
static bool Prefix(StringTokenizer __instance)
{
var tokens = _tokens.GetValue(__instance);
var sourceString = _sourceString.GetValue(__instance);
var delimiter = _delimiter.GetValue(__instance);
Tokenize(tokens, sourceString, delimiter);
_enumerator.SetValue(__instance, tokens.GetEnumerator());
returnfalse;
}
static private void Tokenize(LinkedList<string> tokens, string text, string delimiter)
{
tokens.Clear();
if (string.IsNullOrEmpty(text))
return;
int index = 0;
while(true)
{
var index2 = text.IndexOf(delimiter, index, StringComparison.Ordinal);
if (index2 < 0)
{
tokens.AddLast(text.Substring(index));
break;
}
string token = text.Substring(index, index2 - index);
tokens.AddLast(token);
index = index2 + delimiter.Length;
}
}
}
}
Please update your tokanizer to increase performance. While you are at it:Repro-steps:
Expected behavior:
Observed behavior:
I traced the problem back to the method GridViewSleectedCellsCollection.IsSelected / GetHashCodeString.
internal bool IsSelected(GridViewRowInfo row, GridViewColumn column) => row != null && column is GridViewDataColumn && this.hashtable.Contains((object) this.GetHashCodeString(row, column));
When a cell is selected with GridViewCellInfo.IsSelected = true, it checks if it has already been selected. It does so by calling GridViewSleectedCellsCollection.IsSelected. which checks if a HasCodeString is already in a hashtable. But, when another selected cell has the same HasCodeString, the result is (incorrectly) true, which will result in not added it to the collection of selected cells.
I guess that is can be easily fixed by changing:
private string GetHashCodeString(GridViewRowInfo row, GridViewColumn column)
{
int hashCode = row.GetHashCode();
string str1 = hashCode.ToString();
hashCode = column.GetHashCode();
string str2 = hashCode.ToString();
return str1 + str2;
}
to:
private string GetHashCodeString(GridViewRowInfo row, GridViewColumn column)
{
int hashCode = row.GetHashCode();
string str1 = hashCode.ToString();
hashCode = column.GetHashCode();
string str2 = hashCode.ToString();
return str1 + "_" + str2;
}
Since hashcodes 1 + 23 will result in the same string as hashcodes 12 + 3.
Making this change will reduce the problem significantly, but not entirely since hashCodes will never be unique.
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)
To reproduce: public Form1() { InitializeComponent(); CultureInfo culture = new CultureInfo("en-US"); culture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday; this.radScheduler1.Culture = culture; this.radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Month; Appointment a = new Appointment(new DateTime(2016, 8, 29, 0, 0, 0), new DateTime(2016, 9, 5, 0, 0, 0), "Meeting"); this.radScheduler1.Appointments.Add(a); this.radScheduler1.FocusedDate = new DateTime(2016, 9, 1); } Please refer to the attached gif file.
To reproduce: please refer to the attached sample project and gif file. Workaround: use the CellFormatting event and apply the light orange BackColor for the selected cells belonging to the current pinned column: private void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) { if (e.Row.IsSelected && e.Column.IsCurrent) { e.CellElement.BackColor = Color.FromArgb(255, 231, 174); } else { e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local); } }
To reproduce: - Add RadDropDownButton to a blank form. - Set its anchor property to top, right and its AutoSize property to true. - At runtime set the button text to a long string, you will notice that the button is resized to the right when it should be resized to the left. To workaround this you can subscribe to the SizeChanged event of the button change its location depending on the new size: Size prevSize; public Form1() { InitializeComponent(); radDropDownButton1.AutoSize = true; this.Shown += Form1_Shown; } void Form1_Shown(object sender, EventArgs e) { prevSize = radDropDownButton1.Size; radDropDownButton1.SizeChanged += radDropDownButton1_SizeChanged; } void radDropDownButton1_SizeChanged(object sender, EventArgs e) { RadDropDownButton button = sender as RadDropDownButton; button.Location = new Point(button.Location.X - (radDropDownButton1.Size.Width - prevSize.Width), button.Location.Y); prevSize = button.Size; } private void radButton2_Click(object sender, EventArgs e) { radDropDownButton1.Text = "Very long button text set"; }