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.
Hi,
I inherited my grid from GridControl and loaded it into VS toolbox.
In my grid constructor I have these methods:
this.ControllerOptions &= ~GridControllerOptions.OleDataSource;
this.Model.Options.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow;
Now when I drag-drop my grid to my form I have VS task(exception):
Object type cannot be converted to target type.
And all changes I make to my grid in VS designer are not saved.
Please help,
Vladimir
ADAdministrator Syncfusion Team October 28, 2003 01:58 PM UTC
Currently, only the Syncfusion Essential Tools controls support visual inheritance. We will be adding this support for our grids, but it will be some point after the 2.0 release.
VAVladimir ArkhipovOctober 28, 2003 03:22 PM UTC
So you are saying that I cannot use my grids (inherited from either GridControl or GridDataBoundGrid) in VS designer?
I should always use original grids and manually set up batch of properties every time I use them?
ADAdministrator Syncfusion Team October 28, 2003 05:21 PM UTC
I suspect the reason you are getting the null reference is that when your constructor is called at that point during design time, the Model is null. So, this code chokes.
this.Model.Options......
If you want to include this code and have it hit at runtime, but not design-time then you will have to put a DesignMode property check before calling it. That may allow this to work.
But in general, you will have to until we add additional deigner support for visual inheritance.
ADAdministrator Syncfusion Team October 28, 2003 09:12 PM UTC
You should be able to derive a GridControl, and then drop this derived control onto a form and set its properties there (subject to conditions like the null Model problem that I think you are seeing).
You can debug such problems by having a second instance of VisStu running with the first instance attached for debugging using the Tools|Debug Processes menu option. Then open this problem form in the first instance, and the exception should generate a break in the second instance