View previous topic :: View next topic |
Author |
Message |
jmaeding
Joined: 11 Apr 2008 Posts: 67
|
Posted: Tue Feb 27, 2018 2:41 am Post subject: Disable datasource load in designer? |
|
|
I have a case where the control is causing problems because the datasource object references assemblies not available at design time. This involves autocad and you always tell it to NOT copy local for its assemblies.
I'm doing proggramatic binding.
If I have the GetChildrenForRow return null, the control behaves.
If I use real code, it won't show and I get a designer error screen.
Its not a real problem, everything compiles and runs perfect, just a design time error. Can I somehow turn off the way it tries to run a bit when the designer shows it?
thanks _________________ James M |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 27, 2018 9:55 pm Post subject: |
|
|
The normal approach to this sort of problem is to have your event handler code check to see whether it is running in design mode or not and if it is running in design mode then you can return null. There are a variety of different ways to determine whether you are in design mode - it depends on you application. A simple way is to have some global property (eg InDesignMode) that your application sets to false when it is actually running - but defaults to true otherwise. _________________ Infralution Support |
|
Back to top |
|
|
|