The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I''ve run into a problem that I''m not quite sure how to resolve. I want to subclass the TreeNodeAdv class, but doing so appears to create problems when copying/pasting an instance of the subclass. The TreeNodeAdv class is serializable, and can be retrieved from the clipboard without a problem. Subclasses of the TreeNodeAdv class can be placed on the clipboard easily enough, but can only be retrieved from the clipboard as an instance of a TreeNodeAdv, not as an instance of the subclass.
I''m guessing that my subclass would need to implement the constructor and method for the ISerializable interface, but the TreeNodeAdv class doesn''t seem to make this possible, since it already implements ISerializable, and doesn''t expose the constructor or the method of the interface to subclasses. Any idea where to go from here?
ADAdministrator Syncfusion Team July 19, 2005 09:58 PM UTC
Hi Mathew,
You can still implement ISerializable in your subclass, since C# allows you to reimplement an interface. All TreeNodeAdv saves in GetDataObject is NodeStyle and ChildStyle, which you can do yourself.
Regards,
Gregory Austin
Syncfusion Inc.
MGMathew GowerJuly 20, 2005 11:14 AM UTC
> You can still implement ISerializable in your subclass, since C# allows you to reimplement an interface. All TreeNodeAdv saves in GetDataObject is NodeStyle and ChildStyle, which you can do yourself.
>
Thank you for the reply. Unfortunately, this solution won''t work for us. We''re using VB.NET, which prevents you from re-implementing an interface. We''re working around the problem by associating our data with the tree node, and placing the data on the clipboard. We then reconstruct the tree node when the data is pasted, re-associating the data. Not a perfect solution, but it works. It would be nice if the serializable methods were protected rather than private in future versions to make extended the classes easier in VB.NET.
ADAdministrator Syncfusion Team July 22, 2005 03:42 PM UTC
Hi Mathew,
I have entered this as Feature Request #291.
Regards,
Gregory Austin
Syncfusion Inc.