Current filter:
                                You should refresh the page.
                                  • We introduced .NET Desktop controls now automatically detect potentially unsafe data types and block their deserialization in v19.1 to enhance the deserialization mechanism's security.

                                    As part of this security enhancement, we also changed the (de)serialization behavior of the following settings:
                                    - Data Grid's sort and group configuration (ColumnView.SortInfo), and MRU filters (ColumnView.MRUFiers)
                                    - Tag property (for multiple controls)

                                    Automatically (de)serialize the Tag property for simple data types
                                    A control (de)serializes the Tag property if it only contains a value of the following data types:
                                    - primitive data type (as described in https://docs.microsoft.com/en-us/dotnet/api/system.type.isprimitive?view=netframework-4.7.2)
                                    - string
                                    - decimal
                                    - DateTime
                                    - TimeSpan
                                    - Guid
                                    - nullable variants of these types

                                    Affected controls
                                    The Tag property's (de)serialization is changed for the following controls:
                                    - Data Grid (GridSummaryItem.Tag,  GridColumn.Tag,  BaseView.Tag)
                                    - Tree List (TreeListColumn.Tag)
                                    - Pivot Grid (PivotGridCustomTotalBase.Tag,  PivotGridFieldBase.Tag)
                                    - Chart Control (ChartElement.Tag,  SeriesPoint.Tag)
                                    - DiagramControl (IDiagramItem.Tag)
                                    - Reports (Parameter.Tag, XRControl.Tag, XRPageBreak.Tag, XRSubreport.Tag)
                                    - Editors (FormatRuleBase.Tag)
                                    - TreeMap and Sunburst Controls (TreeMapItem.Tag, SunburstItem.Tag)
                                    - Vertical Grid (BaseRow.Tag)

                                    Custom Type (De)Serialization
                                    If a control's Tag property contains a custom type (any type except those mentioned above), the Tag property is not serialized.
                                    If a Tag property in a saved layout contains a custom type, the Tag property is not deserialized.

                                    (De)Serialization for a custom type is only possible in a string. You can implement a converter (via the IOneTypeObjectConverter interface) that converts a custom type to/from a string. This converter is invoked automatically whenever the (de)serialization mechanism encounters a registered custom type.

                                    The following example shows how to create a simple converter and register it:

                                    [C#]
                                    using DevExpress.Utils.Serializing.Helpers; struct CustomType { public readonly int Value; public CustomType(int value) { this.Value = value; } } public class CustomTypeConverter : IOneTypeObjectConverter { public Type Type { get { return typeof(CustomType); } } public string ToString(object obj) { return ((CustomType)obj).Value.ToString("D"); } public object FromString(string str) { return new CustomType(int.Parse(str)); } } // Register the converter at application startup. ObjectConverter.Instance.RegisterConverter(new CustomTypeConverter());
                                    [VB.NET]
                                    Imports DevExpress.Utils.Serializing.Helpers Friend Structure CustomType Public ReadOnly Value As Integer Public Sub New(ByVal value As Integer) Me.Value = value End Sub End Structure Public Class CustomTypeConverter Implements IOneTypeObjectConverter Public ReadOnly Property Type As Type Implements IOneTypeObjectConverter.Type Get Return GetType(CustomType) End Get End Property Public Shadows Function ToString(obj As Object) As String Implements IOneTypeObjectConverter.ToString Return (CType(obj, CustomType)).Value.ToString("D") End Function Public Function FromString(str As String) As Object Implements IOneTypeObjectConverter.FromString Return New CustomType(Integer.Parse(str)) End Function End Class ' Register the converter at application startup. ObjectConverter.Instance.RegisterConverter(New CustomTypeConverter())

                                0 Solutions

                                Creation Date Importance Sort by